I am expecting plain text to be returned per API guidance but looks like base64 coded
Authenticate the API call
Every request requires a JSON Web Token (JWT) access token. The JWT access token is passed through in the Speech request header. The token has an expiry time of 10 minutes. See Get Started for Free for information about subscribing and obtaining API keys used to retrieve valid JWT access tokens.
The API key is passed to the token service, for example:
POST https://api.cognitive.microsoft.com/sts/v1.0/issueToken Content-Length: 0
The required header for token access is:
Name Format Description, Example and Use
Ocp-Apim-Subscription-Key | ASCII | Your subscription key. |
The token service returns the JWT access token as text/plain.
Solved! Go to Solution.
@bmillrine - I ran it against some RegEx to check; the key it returns is not Base64 encoded, so looks like it is returning what you are expecting.
Here's the piece of regex i used to verify that the string is/isn't Base64 encoded:
^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$
I also threw the returned key into a Base64 encoder tool, just to verify that the RegEx works, and a Regex match returned a "True" value
Sophia thanks for your help