Getting your OAuth credentials and API key

Create an account on the Amazon Apps & Games Developer Portal and add your app, if you have not already done so.

In Apps & Services > My Apps, select the app with which you want to use ADM.

Click Device Messaging.

If you have already assigned a security profile to your app, proceed to step 7.

To assign a security profile to your app, choose an existing security profile from Select a Security Profile or click Create a New Security Profile. A security profile provides the OAuth credentials that you use when sending messages with ADM.

Note: You can share the use of a security profile among more than one app. Sharing a profile allows apps to share some types of data. For example, you might have a "My Cat - Free" app and a "My Cat - HD" app. If you apply a single security profile to both apps, data accessed by that profile is available to both apps. For a shared profile, choose a name that applies to both, for example, "My Cat Apps profile".

If you used an existing security profile, be sure to select Confirm to save your changes.

Click View Security Profile. Then click Kindle/Android Settings.

Create an API key. Your app requires one or more API keys.

(Required) For a pre-release or "debug" version of your app. In all cases, you must create an API key for the debug version of your app, in order to test your app with ADM.

(Optional) For a release or "production" version of your app. If you sign the release version of your app using your own certificate, you must create an additional API key for the release version of your app. If you allow Amazon to sign your app on your behalf, you do not need to create an additional API key.

To create an API key, you must provide both the package name (for example, com.mycompany.bestapplication) for the app and its signature:

Debug application signature for the pre-release version of your app.

Note: You must provide both an MD5 and an SHA-256 signature when you generate your API key.

You can obtain the MD5 or SHA-256 signature of the certificate used to sign the debug version of your app by doing ONE of the following:

Locate the keystore file that is used to sign your app, as well as the alias of the certificate within the keystore file used for signing. For example, if the keystore file is named my_key_store and the certificate within the keystore that is used for signing is called my_certificate_alias, you would run the following command: {JAVA_HOME}/bin/keytool -list -v -alias my_certificate_alias -keystore my_keystore_file

The output should contain an MD5 or SHA-256 value similar to the following. This is your application signature.

Or, if your app is in the form of a signed APK and you are developing on a Unix-like system, you can run the following command instead. Note that you must replace {your-app.apk} with the name of your APK file.

Release application signature for the production version of your app. If you sign the release version of your app using your own certificate, provide the MD5 and SHA-256 signature for that certificate to create an additional API key. If you allow Amazon to sign your app on your behalf, you do not need to obtain an API key for the release signature.