CustomCommandsConfig.FromAuthorizationToken(String, String, String) Method

Definition

Creates an instance of the dialog service config with the specified Custom Commands application id, authorization token and region.

public static Microsoft.CognitiveServices.Speech.Dialog.CustomCommandsConfig FromAuthorizationToken (string applicationId, string authorizationToken, string region);
static member FromAuthorizationToken : string * string * string -> Microsoft.CognitiveServices.Speech.Dialog.CustomCommandsConfig
Public Shared Function FromAuthorizationToken (applicationId As String, authorizationToken As String, region As String) As CustomCommandsConfig

Parameters

applicationId
String

Custom Commands application id.

authorizationToken
String

The authorization token associated with the application.

region
String

Region identifier for the authorization token associated with the application.

Returns

A new Custom Commands config.

Remarks

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.

Applies to