View source: R/ms_authorization.R
ms_get_token | R Documentation |
Get Microsoft Text To Speech (TTS) or Cognitive Services Token from API Key
Check if token has expired
ms_get_token(api_key = NULL, region = "westus")
ms_token_expired(token = NULL)
api_key |
Microsoft Azure Cognitive Services API key |
region |
Subscription region for API key. For more info, see https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/regions |
token |
An authentication of class |
A list of the request and token
Logical vector, indicating whether token has expired
# Get token where region is westus
token = ms_get_token(region = "westus")
# Check if token XXX has expired
ms_token_expired(token = "XXX")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.