0
votes

I followed this tutorial to enable Alexa on my Raspberry Pi 3. To enable and use Alexa, authentication is performed using Login With Amazon. But I was hoping for a headless way of starting Alexa app on the Pi, which is obviously outside the scope of the tutorial. How do Alexa-enabled physical devices authenticate with Alexa Voice Services?

1

1 Answers

1
votes

Alexa enabled headless devices do the authentication using an companion app running on Android or iOS. The details of which can be found here.You can download the sample app and get started. On a production level system you do the authentication like below:

Assuming your device is connected on the network, you do a device discovery using open source discovery protocols like UPNP or bonjour(developer by apple) etc. This is to get the IP address of your device. Once you get the IP address you communicate with the device to get necessary details like product id, DSN and code challenge after receiving these you will start communicating with amazon servers until you get the Authentication tokens.

This procedure is very well documented in Authorizing from a Companion App check "Procedure for Obtaining Refresh and Access Tokens" section.