question

newuser-78c97ca3-22cd-428d-b787-6835092933bd avatar image

Alexa Home Skill - Oauth2 Toolkit - Django Rest Framework - unable to link at this time

Alexa can control smart home devices with its Smart Home Skills. I'm trying it out, but when I try to enable MySkill from the Alexa app, I get 'We were unable to link MySkill at this time'.

I've followed [Alexa's build a smart home skill][1]

I used Django, Django Rest Framework and Oauth2 Toolkit to make my authentication server.

I've tested the oauth2 on the command line with curl and it seems ok.

When I look at Django's output, I see that it processes both the '/o/authorize/?client_id=...' (GET and POST) with returns 200 and 302. After that I see a '/o/token/' with a 200.

Also I see in the database a new 'Access Token' and 'Refresh Token'.

All this makes me think Oauth2 has completed successfully. At the point of failure, it points to a guide, [Link an Alexa User with a User in Your System][2]. In that guide under the Account linking flow for authorization code grant -

> 6. The Alexa service validates the returned information, then uses the code to request an access token and refresh token pair from your authorization server (specified in the Access Token URI field in the developer portal). Both of these items are saved for the Alexa user.

> 7. The user's Alexa account is now linked to the account in your service, and the skill is ready to be used. I think I'm after 6 as token pairs are generated, but I've not got to number 7.

Is there a way to get a more info from amazon alexa to know what why it was unable to link?

I've got CloudWatch connect but there are no logs when it tries to enable. I do see CloudWatch logs when I test the lambda functions.

[1]: https://developer.amazon.com/docs/smarthome/steps-to-build-a-smart-home-skill.html

[2]: https://developer.amazon.com/docs/custom-skills/link-an-alexa-user-with-a-user-in-your-system.html

alexa smart homeaccount 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

KAIYIN@AMAZON.COM avatar image
KAIYIN@AMAZON.COM answered

Hi, thanks for bringing up this question. There are multiple potential reasons might cause this issue, we have a good article for that and you can start troubleshooting from this guide and let us know if you still have questions:) : https://forums.developer.amazon.com/articles/38610/alexa-debugging-account-linking.html My assumption is it might due to SSL cert issue, but you'd better check all the items list in the article.

10 |5000

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