Hi everyone,
To explain you the design, I’ve built an API for Amazon AMS. I export data automatically.
I now have a problem with Automatically follow redirects. When I run my script via POSTMAN, I can download my data, because I could disable the Automatically follow redirects option in the POSTMAN software, so my GET request uses the HTTP 307 redirect.
So I tried in powershell to do the same method:
Here is my command line:
$response = Invoke-RestMethod ‘https://advertising-api-eu.amazon.com/v2/reports/amzn1.clickXXXX/download’ -Method ‘GET’ -Headers $headers -MaximumRedirection 0
But I have nothing, no data, I thought MaximumRedirection 0 allowed to do as in POSTMAN but I don’t understand anymore.
Do you have ideas to help me?
I give you in screenshot the PSOTMAN parameter that allowed me to get what I want.
Thank you in advance.
Maxime