question

Steffen Gerdes avatar image
Steffen Gerdes asked

Missing Authorization Header in Alexa LaunchRequest

We have set up two very similar Alexa Skills with custom model, which both run as a web service and use OAuth2 for authorization. For one skill (the older one) everything works as expected and we got an Authorization header filled with a Bearer token. But for the new skill we don't get an Authorization header for the LaunchRequest. Both Skills are configured to require account linking. Any tipps or ideas what we're missing here?

Thank you!

account linkingalexa skillslaunch
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Andy Whitworth avatar image
Andy Whitworth answered

Not too sure what you're asking. If account linking is required for a skill and has taken place then you should get an accessToken in all of the skill requests (when the user who has linked their account uses the skill).

https://developer.amazon.com/en-US/docs/alexa/account-linking/add-account-linking-logic-custom-skill.html#get-token

As you're talking about Authorization headers and bearer tokens then I guess you're looking for something else ?

2 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Yes, you're right. After successful Account Linking I would expect to receive an AccessToken every time a request gets send to my skill. And it is present in the IntentRequest body, as far as I can tell. But for some reason I don't get the token in an Authorization header for this skill. I do get it in the request headers for another equally configured skill though.
0 Likes 0 ·
Why do you need it from the Authorization header ? Can you not use the value present in the documented part of the request body ?
0 Likes 0 ·