Share via


UserTokenExtensions.GetTokenAsync Method

Definition

Get Token.

public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse> GetTokenAsync (this Microsoft.Bot.Connector.IUserToken operations, string userId, string connectionName, string channelId = default, string code = default, System.Threading.CancellationToken cancellationToken = default);
static member GetTokenAsync : Microsoft.Bot.Connector.IUserToken * string * string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse>
<Extension()>
Public Function GetTokenAsync (operations As IUserToken, userId As String, connectionName As String, Optional channelId As String = Nothing, Optional code As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TokenResponse)

Parameters

operations
IUserToken

The operations group for this extension method.

userId
String

User ID.

connectionName
String

Connection name.

channelId
String

Channel ID.

code
String

Code.

cancellationToken
CancellationToken

The cancellation token.

Returns

A task representing the token response.

Applies to