Skip to content

Setup a Mobile application

  1. Sign in to the Amazon developer console.

  2. Click the Manage icon, and then select Android or iOS as the channel of integration.

  3. Enter the required information to generate an API Key.

  4. Add the API Key to your project.

Add the API key to an Android project

  1. Right-click the assets folder within the Project View in Android Studio.

  2. Select New and then choose File.

  3. If the assets folder doesn’t exist, create it by right-clicking the project's parent directory, selecting New, then Folder, and naming it Assets Folder.

  4. Name the new file as api_key.txt.

  5. Open the api_key.txt file in the editor window provided.

  6. Add your specific API Key to this text file.

  7. Go to the File menu and click Save.

Common Errors

Error Resolution
SDK throws an API key error
ERROR_ACCESS_DENIED Ensure that no unintended characters like Byte Order Marks are added to the api_key.txt file. Remove any extra spaces, line feeds, or suspicious characters that might cause connectivity errors. If needed, obtain a new API key to troubleshoot persistent issues.

Add the API key to an iOS project

  1. Open your project and navigate to the Supporting Files folder.

  2. Select the <project>-Info.plist file (where <project> is your project’s name) to open the property list for editing.

    Ensure that no entries are selected.

  3. From the main menu, click Editor, and then Add Item.

  4. Create a key with the name APIKey and press Enter.

  5. Double-click under the Value column and paste the generated API Key as a value for the APIKey key.

Common Errors

Error Resolution
SDK throws an API key error Ensure that you are using the right bundle identifier.