question

Thabo avatar image
Thabo asked ·

Problem in using Alexa Skill Messaging API to send a simple out of session message to Alexa Smart Home Skill

I am trying to use Alexa Skill Messaging API to send a simple message to my Smart Home Skill. Where to get the user Id in Smart Home Skill? Because skill messaging API needs a userId in path in API URL. I couldn't find anything in the directive request.

Regards

Thabo

alexa smart homesmart homeaws
10 |2000 characters needed characters left characters exceeded

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

Phil McGee avatar image
Phil McGee answered ·

The directive request contains a token commencing 'ATZA|....'. You need to POST that to

https://api.amazon.com/user/profile to get the related userId.


It's explained here: https://developer.amazon.com/docs/login-with-amazon/obtain-customer-profile.html

10 |2000 characters needed characters left characters exceeded

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

Thabo avatar image
Thabo answered ·

@philchillbill Thank you. It solves the problem. So I can assume that Skill messaging API is not only for Custom Skills but also for Smart Home Skills, which is excellent.

10 |2000 characters needed characters left characters exceeded

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