Open igormatkovic opened 3 years ago
I met the same problem. I use the sandbox environment.
Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error:
POST https://sandbox.sellingpartnerapi-eu.amazon.com/reports/2020-09-04/reports/resulted in a
403 Forbiddenresponse: { "errors": [ { "message": "The request signature we calculated does not match the signature you provided. C (truncated...)
Here is my code:
` public function createReport(array $options): ?array{ $response = $this->send( 'POST', '/reports/2020-09-04/reports/', null, ["x-amz-access-token" => $this->accessToken], null, '1.1', [ 'form_params' => [ 'reportType' => 'GET_FLAT_FILE_OPEN_LISTINGS_DATA', 'marketplaceIds' => ['A1F83G8C2ARO7P'], 'dataStartTime' => '2021-01-24T16:00:00Z', ], ] );
if (0 === count((array)$response['payload'])) {
return null;
}
return $response['payload'];
}
`
Any idea? @ionafan2
I don’t really know why it’s happening. I tried myself and got the same error. Then I tried in Postman - same issue. At this point I guess something with the endpoint might be wrong. I'll keep you updated.
More about issue here ->: Troubleshooting canonicalization errors
Is anyone find the solutions for the same ? :|
I'm trying to create a report but when ever i try to do a POST request i get a invalid singing request:
And here is the response I get:
I looked at the core of the library and compared the results, the structure I'm sending matches perfectly with the response I'm receiving from Amazon. But for some reason, the signature ends up different.
Any ideas?