question

Parker Murray avatar image
Parker Murray asked

Alexa Skill does not provide linked cognito account id_token

After linking a cognito account with our alexa skill, We are only given the access_token, which does not allow us to interact with our IoT setup. Is there a way to get the cognito user credentials from the Alexa skill? Is this Possible? Below is linked a similar question that didn't really provide an answer. Can someone tell me definitively if there is a way to access the account linked cognito user's credentials?


https://amazon.developer.forums.answerhub.com/questions/175500/how-to-get-id-token-for-cognito-user-pool-login-fo.html

alexa skills
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

Jason@Amazon avatar image
Jason@Amazon answered

With account linking, you only ever receive the access_token - it isn't possible to just grab user information within the skill request for account linking, as the information is stored on your authorization server (in this case Cognito).

The post you have linked actually discusses the Cognito USERINFO endpoint, which allows you to access_token to grab the user information, so that should be what you are looking for.

10 |5000

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