Access to requested resource is denied 403 SP-API AMAZON - C#

二次信任 提交于 2021-02-10 06:49:10

问题


Problem with to call the new SP-API AMAZON. I am using the C# library provided by Amazon.

https://github.com/amzn/selling-partner-api-models/tree/main/clients/sellingpartner-api-aa-csharp!

resource api : https://sandbox.sellingpartnerapi-na.amazon.com/orders/v0/orders

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

回答1:


You must check the following headers, this error can occur due to the incorrect value from any of them.

  1. In headers you need to send x-amz-access-token i.e valid for only one-hour post generation through token API.
  2. You also have to pass the Authorization in headers this will auto-generate in postman if you choose AWS Signature type in Authorization and set the following keys(Access Key, Secret Key, Aws Region, and Service Name).

Also to test sandbox get orders API: URL value should be this https://sandbox.sellingpartnerapi-eu.amazon.com/orders/v0/orders?CreatedAfter=TEST_CASE_200&MarketplaceIds=XXXX

Sandbox API will only work as per the provided sandbox behavior.



来源:https://stackoverflow.com/questions/64560163/access-to-requested-resource-is-denied-403-sp-api-amazon-c-sharp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!