I would like to programatically create, retrieve and create skill via the SMAPI. The LWA process is implemented, I have obtained the access/refresh token pair, and I am able to do pretty much any GET operation with no problem.
However, as soon as I try POSTing to v1/skills, I am met with the exception:
{ "message": "You do not have access to the resource." }
I have tried passing the Authorization header as both
Authorization: Bearer Atza|...
and
Authorization: Atza|...
But both variants end up the same.
The scopes seemt to be in order. I am requesting
alexa::ask:skills:readwrite alexa::ask:skills:test alexa::ask:models:readwrite alexa::ask:skills:test alexa::ask:models:read alexa::ask:skills:read
The final request URL looks like this:
https://www.amazon.com/ap/oa?client_id=xyba&scope=alexa%3A%3Aask%3Askills%3Areadwrite%20alexa%3A%3Aask%3Askills%3Atest%20alexa%3A%3Aask%3Amodels%3Areadwrite%20alexa%3A%3Aask%3Askills%3Atest%20alexa%3A%3Aask%3Amodels%3Aread%20alexa%3A%3Aask%3Askills%3Aread&response_type=code&redirect_uri=abyx
Indeed, if we look at the permissions that my security profile has obtained, we can see the following:
The request body is not malformed. If I remove one of the parameters, then I get "Request is missing required parameter(s)."
Any help is greatly appreciated.