alexa-pi/AlexaPi

Fix for 400 Bad Request

Open

#366 opened on 2018年1月21日

GitHub で見る
 (8 comments) (2 reactions) (0 assignees)Python (1,324 stars) (402 forks)batch import
bughelp wanted

説明

Fix for the "400 Bad Request" error message when trying to authenticate using http://localhost:5050. This is happening because Amazon requires SSL which isn't supported with this version of AlexaPi. The alternate installation method (https://github.com/alexa/alexa-avs-sample-app) does however support SSL - if you install this you can find the refresh_token that AlexaPi needs to run.

  1. Follow instructions to install alexa-avs-sample-app (https://github.com/alexa/alexa-avs-sample-app).
  2. After setup is complete open the refresh_tokens file (sudo nano /home/pi/Desktop/alexa-avs-sample-app/samples/companionService/refresh_tokens). You'll see a line that starts with "refresh_token:" The token begins at "Atzr...." (ignore the string of numbers prior to Atzr) and is quite long. To copy it I had to scroll to the right, hit return for new line, repeat repeat repeat until I could see it all on one screen. Paste it into a text editor to get rid of all the line breaks and copy it to your clipboard.
  3. Follow the instructions to install AlexaPi. At the end it will prompt you to go to http://localhost:5050, don't bother, it won't work, just close the installer with control c.
  4. Insert the refresh_token into the configuration file for AlexaPi (sudo nano /etc/opt/AlexaPi/config.yaml). Should look something like this: refresh_token: "Atzr | amillionmoreletters"
  5. Start the service with "sudo systemctl start AlexaPi.service"

コントリビューターガイド