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
585 stars 730 forks source link

[C#] Access to requested resource is denied when used SP-API with Vendor central ! #2972

Closed ThanhLuan0932 closed 2 years ago

ThanhLuan0932 commented 2 years ago

Hi everyone, I'm having a problem for 2 weeks. I have a sample C# source code from GitHub: https://github.com/abuzuhri/Amazon-SP-API-CSharp , then I also searched for the same source code but got the same error: "Access to requested resource is denied." when call APIs ex: sellingpartnerapi-na.amazon.com/catalog/v0/items, sellingpartnerapi-na.amazon.com/products/pricing/v0/price Picture3

Specifically, for authentication I followed the instructions at https://developer-docs.amazon.com/sp-api/docs/creating-and-configuring-iam-policies-and-entities

My User - IamConsole userIam My Role - IamConsole roleIam Content policy: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "execute-api:Invoke", "Resource": "arn:aws:execute-api:*:*:*" } ] } Content AsumeRole { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": "sts:AssumeRole", "Resource": "arn:aws:iam::XXXXXXXXXX:role/SellingPartner_Role", "Condition": { "BoolIfExists": { "aws:MultiFactorAuthPresent": "true" } } } ] }

And on https://vendorcentral.amazon.com/sellingpartner/developerconsole I used role Arn to call api from my code web

I also referenced other GitHub issues but still haven't found the solution, can someone help me ! Thanks all !


In my case: Environment: https://vendorcentral.amazon.com Marketplace: US Language code: C# My location: Asia

CrionaAm commented 2 years ago

Hello @ThanhLuan0932 ThanhLuan0932

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