I am trying to retrieve a report that I generated, and shows a 'status' of 'successful'.
When I run the script below, I receive a 200 response. However, per the docs:
"A successful call returns a 307 redirect response. The redirect link points you to the S3 bucket where you can download your report file. The report file downloads as JSON compressed in gzip format."
headers = {
'Amazon-Advertising-API-ClientId': clientid,
'Authorization': access,
'Amazon-Advertising-API-Scope':scope,
'Content-Type':'application/json'
}
response = requests.get(
'https://advertising-api.amazon.com/v1/reports/amzn1.clicksAPI.v1.p1.624466CD.4b8dcbb2-bbc6-4936-a760-c632216a4a5e/download',
headers = headers
)
print(response.json)
response:
<bound method Response.json of <Response [200]