Get Started with Alexa for Residential APIs

Prerequisites

Before you can use Alexa for Residential APIs, you'll need to create an Amazon Business account and register and register it with us, and then create a Login with Amazon (LWA) security profile, using the same Amazon Business account that you registered with Alexa for Residential, and use it to generate an API access token.

To create an Amazon Business account

To register with Alexa for Residential

  • To register your Amazon Business account for Alexa for Residential APIs, contact Alexa for Residential. A member of the Alexa Business Development team will contact you to:
    • Register your company's Amazon Business account e-mail or customer ID, legal entity ID, and app client ID
    • Finalize pricing
    • Finish setting up your subscription
    • Give you your Alexa organization (amzn1.alexa.org.did.{id}) and Alexa for Residential organization (amzn1.alexa.unit.did.{id}) identifiers

Create an LWA security profile

Create a security profile by following steps in the LWA console and note the client ID for your application. After creating your security profile, add your website to the security profile.

Integrate with LWA to get an API access token

To integrate LWA into your application to obtain an API access token, follow the instructions in Integrate LWA with your app to integrate LWA into your application and obtain an LWA API access token. For more information, see Authorization Code Grant. For Alexa for Residential:

  1. Choose Auth Code Grant as your auth grant type.
  2. Request the "alexa::enterprise:management" scope.

Once you can successfully log in with Amazon using your Amazon Business account, you can call Alexa for Residential APIs.

To refresh your access token, follow the instructions in Using Refresh Tokens.

Use the LWA access token

To call the APIs, you must include your API access token as part of the Authorization request header of each API call.

The following is an example CURL request that uses the access token. To use it, change $ACCESS_TOKEN to your real access token and change the URL to the correct one for the API you are calling.

   curl -i -v -X GET -H "Authorization: Bearer $ACCESS_TOKEN" https://api.amazonalexa.com/v2/endpoints

Now that you've registered with Alexa for Residential and are ready to use its APIs, see Managing Roles in Alexa for Residential to learn how to set up admin roles for your users.