Unauthorized issue in Amazon API for Direct-to-Consumer Shipping role

76 views Asked by At

I'm facing an issue with the Amazon API while attempting to create a shipment using the Direct-to-Consumer Shipping role. During the testing phase, I'm encountering a consistent 'Unauthorized' response from the restrictedDataToken API. I'm pretty sure I've selected 'Direct-to-Consumer Shipping (Restricted)' in the developer profile. I also received confirmation from Amazon that the SP-API roles have been APPROVED.

My concerns are: 1. Does it not require key in the header? 2. what is the process to create a shipment? Is it to request from https://api.amazon.com/auth/o2/token, then obtain RDT, then use /shipping/v1/ rates, and then /shipping/v1/shipments?"

Please share your experiences or any insights.I am unable to find sufficient information about RDT via Official doc, I await Amazon Support's Response but it takes longer time than I thought. Normally, they will reply within two days. Seeking Input from Others' Experiences. Thank you in advance for all the answers

The request is based on the official documentatio. The endpiint: https://sandbox.sellingpartnerapi-na.amazon.com/tokens/2021-03-01/restrictedDataToken

Body: json

"restrictedResources": [
    {
        "method": "GET",
        "path": "/orders/v0/orders",
        "dataElements": [
            "buyerInfo",
            "shippingAddress"
        ]
    }
]

method: POST AND response is : "code": "Unauthorized", "message": "Access to requested resource is denied.", "details": "The access token you provided has expired."

0

There are 0 answers