Jaa


TeamsInfo.SendMessageToTeamsChannelAsync Method

Definition

Overloads

SendMessageToTeamsChannelAsync(ITurnContext, IActivity, String, MicrosoftAppCredentials, CancellationToken)

Creates a new thread in a team chat and sends an activity to that new thread. Use this method if you are using BotFrameworkAdapter and are handling credentials in your code.

SendMessageToTeamsChannelAsync(ITurnContext, IActivity, String, String, CancellationToken)

Creates a new thread in a team chat and sends an activity to that new thread. Use this method if you are using CloudAdapter where credentials are handled by the adapter.

SendMessageToTeamsChannelAsync(ITurnContext, IActivity, String, MicrosoftAppCredentials, CancellationToken)

Creates a new thread in a team chat and sends an activity to that new thread. Use this method if you are using BotFrameworkAdapter and are handling credentials in your code.

public static System.Threading.Tasks.Task<Tuple<Microsoft.Bot.Schema.ConversationReference,string>> SendMessageToTeamsChannelAsync (Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Schema.IActivity activity, string teamsChannelId, Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials credentials, System.Threading.CancellationToken cancellationToken = default);
static member SendMessageToTeamsChannelAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Schema.IActivity * string * Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ConversationReference * string>
Public Shared Function SendMessageToTeamsChannelAsync (turnContext As ITurnContext, activity As IActivity, teamsChannelId As String, credentials As MicrosoftAppCredentials, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Tuple(Of ConversationReference, String))

Parameters

turnContext
ITurnContext

Turn context.

activity
IActivity

The activity to send on starting the new thread.

teamsChannelId
String

The Team's Channel ID, note this is distinct from the Bot Framework activity property with same name.

credentials
MicrosoftAppCredentials

Microsoft app credentials.

cancellationToken
CancellationToken

The cancellation token.

Returns

Team Details.

Applies to

SendMessageToTeamsChannelAsync(ITurnContext, IActivity, String, String, CancellationToken)

Creates a new thread in a team chat and sends an activity to that new thread. Use this method if you are using CloudAdapter where credentials are handled by the adapter.

public static System.Threading.Tasks.Task<Tuple<Microsoft.Bot.Schema.ConversationReference,string>> SendMessageToTeamsChannelAsync (Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Schema.IActivity activity, string teamsChannelId, string botAppId, System.Threading.CancellationToken cancellationToken = default);
static member SendMessageToTeamsChannelAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Schema.IActivity * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ConversationReference * string>
Public Shared Function SendMessageToTeamsChannelAsync (turnContext As ITurnContext, activity As IActivity, teamsChannelId As String, botAppId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Tuple(Of ConversationReference, String))

Parameters

turnContext
ITurnContext

Turn context.

activity
IActivity

The activity to send on starting the new thread.

teamsChannelId
String

The Team's Channel ID, note this is distinct from the Bot Framework activity property with same name.

botAppId
String

The bot's appId.

cancellationToken
CancellationToken

The cancellation token.

Returns

Team Details.

Applies to