# Unable to use the amazon API

**URL:** <https://community.amazondeveloper.com/t/unable-to-use-the-amazon-api/5998>\
**Category:** Q&A\
**Tags:** appstore-submission\
**Created:** [August 6, 2024, 9:47pm UTC](https://community.amazondeveloper.com/t/unable-to-use-the-amazon-api/5998 "2024-08-06T21:47:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![habeeb](https://avatars.discourse-cdn.com/v4/letter/h/e36b37/32.png) [@habeeb](https://community.amazondeveloper.com/u/habeeb)\
**Post date:** [August 6, 2024, 9:47pm UTC](https://community.amazondeveloper.com/t/unable-to-use-the-amazon-api/5998/1 "2024-08-06T21:47:34Z")

</div>

So I followed the below guide and although I’m able to receive an access token, with that access token I’m unable to get any response with the access token when I use it on [developer.amazon.com/api/appstore](http://developer.amazon.com/api/appstore).

I tried to send the request using the auth bearer token and I always found out that it gives a 500 internal server error as shown in the below screenshot, can anyone help on this issue.

![Screenshot 2024-08-07 at 00.46.30](https://d3mq594dkmpl37.cloudfront.net/original/2X/7/7bfc17059f31347ada28b69f3e60de1dda98cb66.png)

> **[API Authentication | App Submission](https://developer.amazon.com/docs/app-submission-api/auth.html)**
>
> You need to configure access to the App Submission API before you can use it. Follow these steps: Create a Security Profile using the Appstore Developer Console. From the API ...

---

<div class="post-metadata">

**Author:** ![Levon](https://dhm3gbtzu79o6.cloudfront.net/user_avatar/community.amazondeveloper.com/levon/32/74_2.png) [@Levon](https://community.amazondeveloper.com/u/Levon)\
**Post date:** [August 7, 2024, 4:37pm UTC](https://community.amazondeveloper.com/t/unable-to-use-the-amazon-api/5998/2 "2024-08-07T16:37:51Z")

</div>

Hi habeeb,

Thanks for posting! Please try the following script, replacing the required values (path, access token, etag, etc) with ones from your own account, and see if it works for you:

```auto
import sys
import requests
import json
import os

upload_apk_url = "https://developer.amazon.com/api/appstore/v1/applications/amzn1.devportal.mobileapp.5b33f51f14a64899bd3f278b62e47abc/edits/amzn1.devportal.apprelease.492f1de7263543b1b232dfcc4ecc4abc/apks/upload"
LOCAL_APK_PATH = "your-app.apk"
ACCESS_TOKEN = "Atc|ACTUAL-ACCESS-TOKEN-HERE"
local_apk = open(LOCAL_APK_PATH, 'rb').read()
etag = '21537c98a3dd154e6cd53ec5a281023abc2fa666'
apk_file_name = 'your-app'
all_headers = {
    'Content-Type': 'application/vnd.android.package-archive',
    'fileName': apk_file_name,
    'If-Match': etag,
    'Authorization': "Bearer " + ACCESS_TOKEN
}
upload_apk_response = requests.post(upload_apk_url, headers=all_headers, data=local_apk)
print(upload_apk_response.content)

```

---

<div class="post-metadata">

**Author:** ![system](https://dhm3gbtzu79o6.cloudfront.net/user_avatar/community.amazondeveloper.com/system/32/5065_2.png) [@system](https://community.amazondeveloper.com/u/system)\
**Post date:** [October 11, 2025, 3:22pm UTC](https://community.amazondeveloper.com/t/unable-to-use-the-amazon-api/5998/3 "2025-10-11T15:22:06Z")

</div>

Closed on October 11, 2025, 3:22pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
