amz_sp_api icon indicating copy to clipboard operation
amz_sp_api copied to clipboard

Getting No MWS Authorization exists when requesting authorization code via MWS token

Open noorani786 opened this issue 3 years ago • 2 comments

Hello,

I am getting the below error when calling the get_authorization_code method in the AuthorizationApi

AmzSpApi::ApiError (Error message: the server returns an error
HTTP status code: 400
Response headers: {"Date"=>"Tue, 19 Apr 2022 16:46:45 GMT", "Content-Type"=>"application/json", "Content-Length"=>"131", "Connection"=>"keep-alive", "x-amzn-RequestId"=>"6becf978-e4d0-4d75-b071-2033fc37da06", "x-amzn-RateLimit-Limit"=>"1.0", "x-amz-apigw-id"=>"Q1kaZGzhIAMFgKw=", "X-Amzn-Trace-Id"=>"Root=1-625ee775-4588056d54a5467f1ddac399"}
Response body: {
  "errors": [
    {
      "code": "InvalidInput",
      "message": "No MWS Authorization exists",
      "details": ""
    }
  ]
})

The MWS Token is valid since I am able to use it to successfully make calls via the MWS Api on behalf of the seller.

Stuck on this issue for a few days now so any help you can provide will be really appreciated!

noorani786 avatar Apr 19 '22 17:04 noorani786

Did you get this resolved?

philsmy avatar Aug 07 '22 02:08 philsmy

grantless operations aren't currently supported in this gem but i'd love to see someone contribute a fix for them. there's a gist in this thread that's a starting point https://github.com/ericcj/amz_sp_api/issues/3#issuecomment-823332904

ericcj avatar Oct 07 '22 17:10 ericcj