Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Bing Speech - JWT Access Token

bmillrine
8 - Asteroid

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-KeyASCIIYour subscription key.

The token service returns the JWT access token as text/plain.

 

API Documentation

2 REPLIES 2
SophiaF
Alteryx
Alteryx

@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}==)$

 

ase64.jpg

 

 

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 Fraticelli
Senior Solutions Architect
Alteryx, Inc.
bmillrine
8 - Asteroid

Sophia thanks for your help

Labels