question

newuser-499c3665-77f5-4897-ab21-15bef5a0acd1 avatar image

Account Linking Problem

Hello There,

I'm trying to develop a smart home skill. As you have to implement account linking for SHS(smart home skill) I used LWA(login with amazon) as oAuth provider. And now problems begin: login view is shown and I click allow but then I see this generic error: https://imgur.com/1JKvapP ("we were unable to link <skill-name> at this time"). I spent more that a week trying to figure out what's the problem. Went over all answers on stackoverflow, amazon forums, etc and got nothing. Checked my configurations 10 times. Zero results.

I just don't know where to look for a clue.

Anyone able to help me?

Best,

Vlad

alexa smart homeaccount linkinglogin with amazon
10 |5000

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

newuser-01bc7cf6-6b7d-4b36-942d-90d8ca796835 avatar image
newuser-01bc7cf6-6b7d-4b36-942d-90d8ca796835 answered

Go to the "Configuration" tab of your smart home skill, and uncheck the "Send Alexa Events" box. (--> https://imgur.com/a/nsX2H)

If this solves your problem, then you need to answer the "AcceptGrant" message coming via lambda and store the provided token for later asynchronous responses. If you do not send a "AcceptGrant.Response" back, your linking will fail everytime. More info here:

https://developer.amazon.com/de/docs/device-apis/alexa-authorization.html

1 comment
10 |5000

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

Nope, this doesn't solve my problem. I do skill by sample code (https://github.com/alexa/alexa-smarthome/tree/master/sample_lambda/python) and here access giving is handled. I double checked thing with "Send Alexa events" and it has no effect on results, only the message is shown in a different style (because of pitangui redirect url).

Any more ideas? I'm going crazy...

PS. appreciate your help!

0 Likes 0 ·
newuser-01bc7cf6-6b7d-4b36-942d-90d8ca796835 avatar image
newuser-01bc7cf6-6b7d-4b36-942d-90d8ca796835 answered

Ok, if you use the sample lambda code then AcceptGrant is indeed handled. I do the complete processing on my own server. And that wasted me some hours. -.-

Because you got routed back, we know that "Authorization URL", "Client ID" and Scope are correct. The only way i could provoke an error was by using wrong values for "Access Token URI" or "Client Secret".

Access Token URI should be: https://api.amazon.com/auth/o2/token

Client Secret is the value you get from LWA. Maybe a copy+paste error. Try to copy it to notepad, check that it only contains a-zA-Z0-9 with no spaces, then copy it from notepad to your skill setting.

It this is not helping you, you should post your Skill-ID. Maybe someone vom Amazon can look into this for you. :)

1 comment
10 |5000

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

Did all this stuff. Double checked client secret. Auth Token URI is exactly you mentioned. Still no results(

I have opened a ticket for support but don't know how receptive they are. Just in case someone from amazon will notice this post before anybody will get hands on my ticket this is my skill id: amzn1.ask.skill.11d7f999-7e9f-4172-b767-ee956106e3b6 .

There is one hope to try to debug it but it's possible only with Gateway API service as a proxy between oauth service and the alexa api. I've found a tutorial but it's outdated (using old gateway api version). I'm not really experienced in these amazon services and don't know how to manage it.

0 Likes 0 ·
Tsuneki@Amazon avatar image
Tsuneki@Amazon answered

Hi there,

Thank you for posting on the forums. It looks like you filed a contact us case regarding this issue. I'll follow up with you directly via e-mai. Thank you,

10 |5000

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