Authorization problem


#1

Hello,

I am trying to implement Alexa on a Matix-IO-Voice/Raspberry Pi and follow the link:

After bash ./startauth.sh ,I get the following terminal message:
The refresh request failed with the response code 400.
This might be due to a bad refresh token or bad client data.
We will continue with getting a refresh token, discarding the one in the file.

  • Running on http://127.0.0.1:3000/ (Press CTRL+C to quit)
    127.0.0.1 - - [22/Jan/2019 11:10:49] “GET / HTTP/1.1” 302 -

On my browser at localhost:3000:
Error Summary
400 Bad Request
The redirect URI you provided has not been whitelisted for your application.
Please add your redirect URI in the ‘Allowed Return URLs’ section under ‘Web Settings’
for your Security Profile on Amazon Developer Portal.
Request Details
scope=alexa%3Aall
redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauthresponse
response_type=code
client_id=amzn1.application-oa2-client.bf70e5d538274985876e5d702105772d
scope_data=%7B%22alexa%3Aall%22%3A%7B%22productID%22%3A%22AlexMat22%22%

I have created before an AVS profile and confirmed it under:

What went wrong? Any hint is very welcome.
Best regards Walter


#2

Problem solved, I made two errors:

  1. Did not set allowed orgins and URLs in the security profile.
  2. Did use wrong Client ID, the one in the security profile works OK.

Have good success with your projects
Walter