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
612 stars 739 forks source link

Calls To Reports API for any report returning "Access to requested resource is denied." code: "Unauthorized" #1713

Closed ezpinsky closed 3 years ago

ezpinsky commented 3 years ago

The Issue is Business Critical!

CASE ID: 8611261301

Action Taken:

Expected Behavior:

Issue Encountered:

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

Context:

We successfully authorized the Seller Central Account in this request using the "Website authorization workflow" with an OAuth Authorization URI . We are sending the refresh token that we received from that workflow. The client confirmed that in their Seller Central Dashboard->Apps & Services->Manage Your Apps, our app is listed and enabled. We have authorized other accounts in the exact same way and have encountered no problems. We tested with multiple reportTypes but all gave us the same error. This leads us to believe it is a problem on amazons side of things.

What We Tried:

We even asked the client to manually disable our app in their seller central account and then reauthorize us using the "Marketplace Appstore Authorization Workflow". This was also done successfully but the new refresh token from that authorization also resulted in the same response as above with a AccessDeniedException from Amazon when requesting a report from the report API.

CASE ID: 8611261301

I have already made a case for this issue using https://developer.amazonservices.com/support but have not yet received a reply with a solution. It's been several days and this issue is preventing us from accessing data for one of our most valuable clients. This is business critical and unfortunately the response time from amazon support has not been the best.

We will lose our client if we can't authorize them in the next week or so.

@jenilew, @parvathm, @ShivikaK or another dev, could you please help us out here? Thank you!

rugved1991 commented 3 years ago

Hi @ezpinsky,

Thanks for reaching out. We are currently investigating this issue and will get back to you with an update shortly. If we need any additional information from you we will reach out through the support case. Thanks for your patience and cooperation.

Best, Rugved Solutions Architect, SP API

ezpinsky commented 3 years ago

@rugved1991 thank you for the quick response!

abdulrehmanGtech commented 3 years ago

Please any one can help with amazon Selling Partner API I created application in selling central account I got client_id in this format {{amzn1.application-oa2-client.xxxx }} api need format like this {{amzn1.sellerapps.app.xxxx}} Please help me how can I find proper client id For api following this doc(shorturl.at/itGV9) Api link (https://github.com/amzn/selling-partner-api-docs)

rugved1991 commented 3 years ago

Hi @ezpinsky,

Please check the support case for updates. Feel free to close this GitHub issue if its resolved.

Best, Rugved Solutions Architect, SP API

ezpinsky commented 3 years ago

Closing this issue now because it is resolved. For those having a similar issue here is what Amazon told us.

"It appears that, when you revoke and then immediately re-authorize an application, there may be some transient authorization issues." - Amazon Support Engineer All we had to do was wait a few days for the "transient authorization issues" to fix themselves. Our client is fully authorized and we can successfully make requests to the api on their behalf.

yizeku commented 3 years ago

Hi @ezpinsky,

How did you solve this problem? I encountered the same issue.

ezpinsky commented 3 years ago

Closing this issue now because it is resolved. For those having a similar issue here is what Amazon told us.

"It appears that, when you revoke and then immediately re-authorize an application, there may be some transient authorization issues." - Amazon Support Engineer All we had to do was wait a few days for the "transient authorization issues" to fix themselves. Our client is fully authorized and we can successfully make requests to the api on their behalf.

See closing comment above.