Alexa SMAPI error, The request has an invalid parameter : scope

Viewed 1003

I just want an API to sync with ALEXA Shopping/Todo lists.

After trying to use the standard documentation for how to get Alexa list data from the default shopping list, I am getting an error that it says you should only get when you don't use the scope scope=alexa:skill_messaging

curl -k -X POST -H 'Content-Type: application/x-www-form-urlencoded' -d 'grant_type=client_credentials&client_id=<redacted-id>&client_secret=<redacted-secret>&scope=alexa:skill_messaging' https://api.amazon.com/auth/O2/token

And I get the following error

{"error_description":"The request has an invalid parameter : scope","error":"invalid_scope"}

The help section says, INVALID_SCOPE The requested scope is invalid, which means it is not alexa:skill_messaging. Which makes no sense because it IS exactly, by the book, what it is supposed to be.

This is all straight out of the docs, https://developer.amazon.com/docs/custom-skills/access-the-alexa-shopping-and-to-do-lists.html#request-format so I am very confused. I'm only trying to do the first part in the picture shown below, which doesn't require any user information.

First part.

1 Answers

You first have to go into the Alexa app on your phone and give the skill the consent to access your list Allow access to my shopping list.

Then you can grab the consent token using the flow described in the picture and then what I did was go into the Skills console and grabbed the consent token from the test request that was tied to my personal account and used that consent token within my alexa app.

You can get the app at https://github.com/fergyfresh/deelist

Related