Language

ConversationClient.AddReactionAsync Method

Definition

Adds a reaction to an activity in a conversation.

public virtual System.Threading.Tasks.Task AddReactionAsync(string conversationId, string activityId, string reactionType, Uri serviceUrl, Microsoft.Teams.Core.Http.BotRequestContext? requestContext = default, System.Collections.Generic.Dictionary<string,string>? customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AddReactionAsync : string * string * string * Uri * Microsoft.Teams.Core.Http.BotRequestContext * System.Collections.Generic.Dictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.AddReactionAsync : string * string * string * Uri * Microsoft.Teams.Core.Http.BotRequestContext * System.Collections.Generic.Dictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function AddReactionAsync (conversationId As String, activityId As String, reactionType As String, serviceUrl As Uri, Optional requestContext As BotRequestContext = Nothing, Optional customHeaders As Dictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

conversationId
String

The ID of the conversation. Cannot be null or whitespace.

activityId
String

The ID of the activity to react to. Cannot be null or whitespace.

reactionType
String

The type of reaction to add (e.g., "like", "heart", "laugh"). Cannot be null or whitespace.

serviceUrl
Uri

The service URL for the conversation. Cannot be null.

requestContext
BotRequestContext

Optional per-request properties (see BotRequestContext) to stamp onto the request's options.

customHeaders
Dictionary<String,String>

Optional custom headers to include in the request.

cancellationToken
CancellationToken

A cancellation token that can be used to cancel the operation.

Returns

A task that represents the asynchronous operation.

Exceptions

Thrown if the reaction could not be added successfully.

Applies to