Share via


BotFrameworkConfig.FromAuthorizationToken(String, String, String) Method

Definition

Creates an instance of the bot framework config with the specified authorization token and region. Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires, the caller needs to refresh it by calling this setter with a new valid token. As configuration values are copied when creating a new recognizer, the new token value will not apply to recognizers that have already been created. For recognizers that have been created before, you need to set authorization token of the corresponding recognizer to refresh the token. Otherwise, the recognizers will encounter errors during recognition.

public static Microsoft.CognitiveServices.Speech.Dialog.BotFrameworkConfig FromAuthorizationToken (string authorizationToken, string region, string botId = "");
static member FromAuthorizationToken : string * string * string -> Microsoft.CognitiveServices.Speech.Dialog.BotFrameworkConfig
Public Shared Function FromAuthorizationToken (authorizationToken As String, region As String, Optional botId As String = "") As BotFrameworkConfig

Parameters

authorizationToken
String

The authorization token associated with the bot

region
String

Region identifier for the authorization token associated with the bot

botId
String

The optional bot ID (aka bot secret) used to select a bot associated with the given subscription

Returns

A new bot framework config.

Applies to