Share via


BotFrameworkAdapter.GetConversationsAsync Method

Definition

Overloads

GetConversationsAsync(ITurnContext, String, CancellationToken)

Lists the Conversations in which this bot has participated for a given channel server. The channel server returns results in pages and each page will include a continuationToken that can be used to fetch the next page of results from the server.

GetConversationsAsync(String, MicrosoftAppCredentials, String, CancellationToken)

Lists the Conversations in which this bot has participated for a given channel server. The channel server returns results in pages and each page will include a continuationToken that can be used to fetch the next page of results from the server.

GetConversationsAsync(ITurnContext, String, CancellationToken)

Lists the Conversations in which this bot has participated for a given channel server. The channel server returns results in pages and each page will include a continuationToken that can be used to fetch the next page of results from the server.

public virtual System.Threading.Tasks.Task<Microsoft.Bot.Schema.ConversationsResult> GetConversationsAsync (Microsoft.Bot.Builder.ITurnContext turnContext, string continuationToken, System.Threading.CancellationToken cancellationToken);
abstract member GetConversationsAsync : Microsoft.Bot.Builder.ITurnContext * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ConversationsResult>
override this.GetConversationsAsync : Microsoft.Bot.Builder.ITurnContext * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ConversationsResult>
Public Overridable Function GetConversationsAsync (turnContext As ITurnContext, continuationToken As String, cancellationToken As CancellationToken) As Task(Of ConversationsResult)

Parameters

turnContext
ITurnContext

The context object for the turn.

continuationToken
String

The continuation token from the previous page of results.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

A task that represents the work queued to execute.

Remarks

If the task completes successfully, the result contains a page of the members of the current conversation. This overload may be called during standard activity processing, at which point the Bot's service URL and credentials that are part of the current activity processing pipeline will be used.

Applies to

GetConversationsAsync(String, MicrosoftAppCredentials, String, CancellationToken)

Lists the Conversations in which this bot has participated for a given channel server. The channel server returns results in pages and each page will include a continuationToken that can be used to fetch the next page of results from the server.

public System.Threading.Tasks.Task<Microsoft.Bot.Schema.ConversationsResult> GetConversationsAsync (string serviceUrl, Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials credentials, string continuationToken, System.Threading.CancellationToken cancellationToken);
member this.GetConversationsAsync : string * Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ConversationsResult>
Public Function GetConversationsAsync (serviceUrl As String, credentials As MicrosoftAppCredentials, continuationToken As String, cancellationToken As CancellationToken) As Task(Of ConversationsResult)

Parameters

serviceUrl
String

The URL of the channel server to query. This can be retrieved from context.activity.serviceUrl.

credentials
MicrosoftAppCredentials

The credentials needed for the Bot to connect to the services.

continuationToken
String

The continuation token from the previous page of results.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

A task that represents the work queued to execute.

Remarks

If the task completes successfully, the result contains a page of the members of the current conversation. This overload may be called from outside the context of a conversation, as only the bot's service URL and credentials are required.

Applies to