- OAuth2 login
- Access Token / Refresh Token
You can install the web server manually or use the Heroku service.
Download and Install
$ git clone https://github.com/webispy/avs_companion.git
$ cd avs_companion
$ npm install
Run
$ node bin/www
listening on port 3000
You need to input CLIENT_ID, CLIENT_SECRET and PRODUCT_ID environment variables to deploy to Heroku. The values can be obtained through the Alexa Voice Service registration below.
If deployed to the Heroku, it could be a security risk because someone else who knows the URL can access it. So, when you are done testing, please stop the service in the Heroku dashboard.
https://developer.amazon.com/avs/home.html#/avs/home
Click the CREATE PRODUCT Button
- Product name: ... (e.g. MyAVS)
- Product ID: ... (e.g. AVSTest) - Copy this value to notepad
- Product type: Alexa-Enabled Device
- Will your device use a companion app? No
- How will end users interact with your product? Choose anything
- Do you intend to distribute this product commercially? No
- Is this a children’s product or is it otherwise directed to children younger than 13 years old? No
- click NEXT Button
- Security Profile: click CREATE NEW PROFILE
- Security Profile Name: ...
- Security Profile Description: ...
- click NEXT Button
- Platform Information: Web
- Copy Client ID and Client secret to notepad
- Allowed return URLs: http://localhost:3000/avs/callback or http://{your-heroku-app}.herokuapp.com/avs/callabck
- click FINISH Button
Open web browser with http://localhost:3000/setup
- Client ID: paste Client ID from notepad
- Client Secret: paste Client secret from notepad
- Device Type ID: paste Product ID from notepad
- click SAVE
- Restart web server
Open web browser with http://localhost:3000/ or http://{your-heroku-app}.herokuapp.com/
- Click Get token button
- Login with your alexa account
- Allow your product
- DONE. Copy the token to your AVS application
- The token is valid for one hour only. After one hour, you have to get the value again through the refresh token process.
Copyright (c) 2017 Inho Oh webispy@gmail.com