Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
The Vega Login with Amazon (LWA) API provides functionality that allows you to protect your customer information by leveraging the user authentication system used by Amazon.com. Before you add LWA to your Vega app, you must register your app with LWA. To learn more about what is LWA and how it works, see Login with Amazon Documentation.

Prerequisites

The following list shows the items you need before you can add LWA to your Vega app:

Get an API key

To use LWA with your app, you need to provide the app’s API key. The API key is an identifier that the Amazon Authorization Manager uses to identify your app to the LWA authorization service. You need different API Keys for debug and production apps. You generate the API key using the app package ID and the app MD5 and SHA256 Signatures. While the package ID for the debug and production versions of your app is the same, you use different procedures to retrieve the MD5 and SHA256 Signatures. To retrieve the signature for a debug app, see MD5 and SHA256 Signatures for debug apps. For production apps, see MD5 and SHA256 Signatures for production apps. Follow the steps below to create an API ey and add it to your LWA account:
  1. Open the Amazon Appstore Developer Console and log in to your account.
  2. Create or open an existing security profile. For more information, see LWA docs.
  3. Add an API key for your Vega app.
    1. Select Android/Kindle Settings.
    2. Go to Add an API Key. Enter the following information:
      • API Key Name - create a name to identify your app.
      • Package - enter your package ID, such as com.mycompany.myapp.
      • MD5 Signature - enter the MD5 signature.
      • SHA256 Signature - enter the SHA256 signature.

MD5 and SHA256 Signatures for debug apps

  1. Connect the Fire TV Stick to your development machine.
    1. Open a terminal shell and run the vda devices command.
    2. Confirm the device serial number is listed in the output. .
  1. In the terminal, run . Replace with your app’s package name. You can find the package name in your manifest.toml file.
  1. Locate the signature information.
    1. In the command output, find the “Signers info” section.
    2. Note down both the MD5 and SHA256 signatures for any one of the signers. For the SHA256 signature, there are two lines in the output. Connect the lines with a :. For example, if your output shows this for SHA256:
The correct string for SHA256 is 17:6c:1b:d5:24:d6:0d:6c:e7:88:fd:9c:61:09:c2:01:b2:21:2a:79:66:10:c8:a7:74:64:11:d0:13:39:31

MD5 and SHA256 Signatures for production apps

For a release, or “production”, version of your app, you must create an additional API key using Appstore’s MD5 and SHA256 signatures and store it in your app’s manifest.toml file. This is also required for apps that use In-App Purchasing (IAP) or Live App Testing (LAT). You can find your Appstore certificate hash values in the Developer Console to create the API keys for existing apps. Go to My apps > select your app’s current version > Upload Your App File > Appstore Certificate Hashes.

Extract clientID from API key

The API key is a JWT (JSON Web Token). You can decode this key to find your clientID, which is used for backend services. Use any JWT decoding tool to decode the API key.

Setup

  1. Add the following library dependency to the dependencies section of your package.json file.
  2. In your manifest.toml, add the following privilege and replace api_key with the API key that you obtained earlier.
Apps that use IAP or LAT have separate requirements for API keys. See the Production apps section above for details.

Usage

Example: Authorize a user

The following code example demonstrates how to integrate the Authorize call into your React Native components to initiate user authorization flow and obtain access tokens and user details.

Example: Get an authorization token

The following code example demonstrates how to integrate the GetToken call into your React Native components to retrieve authorization tokens for specified scopes.

Example: Get user details

The following code example demonstrates how to integrate the GetUser call into your React Native components to fetch and display user profile information.

Example: Sign out a user

The following code example demonstrates how to integrate the Signout call into your React Native components to allow users to securely sign out from their accounts.

Modules


Last modified on February 19, 2026