Description
I want to create a test account. I successfully created test accounts, but GetAccountInformation keeps returning a 502 error, with the error message: "Internal server error."
https://advertising.amazon.com/API/docs/en-us/guides/account-management/test-accounts/authorization-for-test-accounts
step1: I followed the documentation to make authorization and retrieve access token.
https://advertising.amazon.com/API/docs/en-us/test-accounts/openapi
step2: API to create test accounts
headers = {
"Authorization": f'Bearer {access_token}',
"Amazon-Advertising-API-ClientId": lwa_client_id,
"content-type": "application/json",
}
data = {
"countryCode": "US",
"accountType": "AUTHOR"
}
url = "https://advertising-api.amazon.com/testAccounts"
res = requests.post(url=url, headers=headers, data=json.dumps(data))
>>>{"requestId":"4NNWV6NA3A4N1HS3QHZF"}
setp3: GetAccountInformation
request_id = "4NNWV6NA3A4N1HS3QHZF"
url = "https://advertising-api.amazon.com/testAccounts"
headers = {
"Authorization": f'Bearer {access_token}',
"Amazon-Advertising-API-ClientId": lwa_client_id,
"content-type": "application/json"
}
params = request_id
res = requests.get(url=url, headers=headers, params=params)
>>>{"message": "Internal server error"}
So, is there a problem with Amazon's service, or did I make some mistakes in my requests?
#112
BTW, I also try to use postman to create test account following this discussion, but when i import Amazon_Ads_API.postman_collection.json to postman, postman report error "Failed to import collection Amazon Ads API Copy 2"