Skip to main content
Amazon Device Messaging (ADM) requires two sets of credentials to send push notifications to Amazon (Fire OS) apps:
  • OAuth credentials — a Client ID and Client Secret, which OneSignal uses to authenticate with the ADM servers.
  • An API key — which ADM uses to verify your app’s identity on-device. This key is stored inside your app’s project.
Both come from a Security Profile in the Amazon Developer Console.

Requirements:

1

Create or assign a security profile

Log in to the Amazon Developer Console.From the top navigation bar, choose My Apps. Find your app, expand the row, and select View to open the app listing.In the sidebar, click App Services.In the Device Messaging section, click Select existing security profile or create new.
If you have already assigned a security profile to your app, expand the Attached security profile and related details section and skip ahead to the next step.
Choose an existing profile from the Security Profile drop-down menu, or click Create Security Profile to create a new one. A security profile provides the OAuth credentials you’ll use to send messages with ADM.Click Enable Security Profile to save. You should see a success message confirming device messaging was enabled on your app.
2

Generate an API key

The following steps let you test push notifications before publishing your app to the Amazon Appstore.Click the View Security Profile link. Under Security Profile Management, click the Android/Kindle Settings tab.Click Add an API Key. To create the key, provide:
  • API Key Name — any name you like.
  • Package name — your Android package name (for example, com.mycompany.bestapplication). This value is case sensitive.
  • MD5 and SHA-256 signatures of the keystore used to sign your app.
Amazon now requires both the MD5 and SHA-256 values of your signing certificate.
To obtain your signature values, use any of the following:
  • From your keystore (replace the alias and keystore name with your own):
  • From a signed APK (on a Unix-like system):
  • From Android Studio — open the Gradle side pane, expand app > Tasks > android, and double-click signingReport.
We recommend not using the default debug keystore for production. If you do use it for testing, redo this step with your production keystore before release, or let Amazon sign your app for you.
When you’re done, click Add.Copy the generated API key — you’ll store it in your app’s project (see the final step).
3

Get your OAuth credentials (Client ID and Client Secret)

Still under Security Profile Management, click the Web Settings tab.Copy the Client ID and Client Secret shown on this page. You’ll paste these into OneSignal in the next step.
4

Configure your OneSignal app's Amazon platform settings

In the OneSignal dashboard, select your app from the All Apps page, then go to Settings. Under Native App Platforms, click Amazon Fire.Paste your Client ID and Client Secret into the fields and click Save.
5

Store the API key in your app

Save the API key you copied earlier into a new file named api_key.txt.Place this file inside your project’s assets folder. This location is required for ADM to find the key.
Insert the API key as the only data in the file. ADM cannot recognize the key if it contains any spaces or line breaks.
For a release (production) build, you may need to generate an additional API key depending on how your app is signed. If your app uses the Appstore SDK, or you sign the release build with your own certificate, create a separate API key for the release signature. If you use IAP SDK v2.0 (or no in-app purchasing SDK) and let Amazon sign your app, no additional release key is needed.More details on the placement of this file can be found in our Amazon SDK Setup documentation.

Done! You now have the OAuth credentials and API key needed to send push notifications to your Amazon app. 🥳Return to the Amazon SDK Setup guide to install the OneSignal SDK in your app.