double-break / spapi-php

Amazon Selling Partner API PHP Client
MIT License
56 stars 48 forks source link

"Access to the requested resource is denied," in some of the functions. #56

Open javierquiles opened 1 year ago

javierquiles commented 1 year ago

I am working with the API and it works for subscribe and receive notifications, inventory, catalog and orders. But when I try to work with the messages (for example getMessagingActionsForOrder), I get the error :

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

where do I have to give permissions to be able to work with this feature, in AWS AIM or in Seller Central APP?

Thanks

diggde commented 1 year ago

I've got the same error message by a simple catalog item request:

$result = $catalogClient->getCatalogItem('B074Z9QH5F', ['marketplaceIds' => 'A1PA6795UKMFR9']);
$result = $catalogClient->searchCatalogItems(['marketplaceIds' => 'A1PA6795UKMFR9', 'identifiers' => 'B096Y75NSJ']);

Error:

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

Can someone help?

diggde commented 1 year ago

I found the solution here: https://stackoverflow.com/a/66860192/1259049