amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
609 stars 732 forks source link

[BUG] Access to requested resource is denied - unauthorized #2971

Closed Muschke closed 2 years ago

Muschke commented 2 years ago

there is something missing in the documentation how you can get acces to the sp-api endpoint.

We made a AWS user en created IAM user in their. We also created a policy SellingPartnerApi according to documentation: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "execute-api:Invoke", "Resource": "arn:aws:execute-api:::*" } ] } We added this policy to the userRole we created. Afterwards we added the inline policy STS: { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": "sts:AssumeRole", "Resource": "arn:aws:iam::796138068875:role/MYRN" } ] } Also, I added to the user a direct permission to the SellingPartnerApi, additional cause some people already suggested this in this forum.

Aftwards we authorised the app, based on the ARN role. Than we tried api requests with postman before syncing it into our code. the Api request for the token works and we receive a working token. The api request to AssumeRole works and we receive credentials AccesKeyId, SecretAcceskey en SessionToken. Than if we try to perform the request to the api endpoint, finally, where it is al about (https://sellingpartnerapi-eu.amazon.com/sellers/v1/marketplaceParticipations):

{ "errors": [ { "message": "Access to requested resource is denied.", "code": "Unauthorized", "details": "" } ] }

What did we miss that it doesn't authorize?

CrionaAm commented 2 years ago

Hello @Muschke

In order to correctly resolve this issue, please open a support case (https://developer.amazonservices.com/support) so we can pursue the investigation as additional details are required from your end.

Thanks, Críona Selling Partner API Developer Support

jrmaia commented 2 years ago

Hi, any solution? I have the same issue! Can you help me?

born2net commented 1 year ago

any solution? been at this for days now...