question

Louis Lin avatar image
Louis Lin asked

App-to-app account linking problem when it goes to send skill activation api

Hey guys

I am trying to implement the app-to-app account linking but have some problem. The response of the skill enablement api shows that "The user does not have a valid enablement for your skill.". I now understand that it is required to use the auth code retrieved from my own authorization server in the step 6(https://developer.amazon.com/en-US/docs/alexa/account-linking/app-to-app-account-linking-starting-from-your-app.html#step-6). However, I still have no clue on this. If an auth code generated by my authorization server is needed, there must be some data exchange between my authorization server and alexa server, otherwise the auth code won't be validate. How do I implement such a data exchange? Is there any material for this? I have to say it is quite non-linear description for in the development documentation...

Thank you anyway.

account linking
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

Hi, doesn't the "How it works" flow diagram help ?

https://developer.amazon.com/en-US/docs/alexa/account-linking/app-to-app-account-linking-starting-from-your-app.html#how-it-works

It shows that your backend system retrieves the auth code from your auth server and then calls the Alexa skill enablement API using this auth code.

4 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.

Thank you for the comment. But if I do so, it means that I just generated an authcode which might be some random string and the alexa server should accept it whatever it is. Am I understanding it correct?

0 Likes 0 ·
Yes, Amazon don't care what the auth code you generate looks like. Amazon will call your access token URL, passing your auth code and expect an access token to be returned. This access token is then stored by Amazon and passed in all subsequent skill requests.

See steps 5, 6 and 7 in the "How it works" flow.

1 Like 1 ·
Understand, I will try it and get the result back as soon as possible. Thank you for your help!
0 Likes 0 ·
Show more comments