Need help to fix sp api "Access to requested resource is denied" issue

Countries

Read only
Australia
Belgium
Brazil
Canada
Egypt
France
Germany
India
Italy
Japan
Mexico
Netherlands
Poland
Saudi Arabia
Singapore
Spain
Sweden
Turkey
United Arab Emirates
United Kingdom
United States
United Kingdom
imgSign in
user profile
Seller_lvQuJYcXjzy6E

Need help to fix sp api "Access to requested resource is denied" issue

I am successfully able to generate the access key, secret key, and session token. Additionally, I can retrieve the marketplace ID and seller information using the API without any issues. However, when I attempt to call the ProductListing API, I receive the following error message:

Client error: POST https://sellingpartnerapi-eu.amazon.com/listings/2021-08-01/items resulted in a 403 Forbidden response: { "errors": [ { "code": "Unauthorized", "message": "Access to requested resource is denied.", "d (truncated...)

I have already granted the necessary permissions, and I also reauthorized the application. Could you please assist in identifying the cause of this issue? Any guidance would be greatly appreciated.

34 views
2 replies
Tags:Add a product
00
Reply
2 replies
user profile
Seller_i6S8knzW6zU6Z

Hi @Seller_lvQuJYcXjzy6E,

Since you mentioned successfully retrieving marketplace ID and seller information, it seems your general Selling Partner API authentication is set up correctly.

However, the Listings Items API is a sub-API, and it requires you to explicitly pass the appropriate credentials during its initialization.

  1. lwaClientId: Your Login with Amazon (LWA) client ID.
  2. lwaClientSecret: Your LWA client secret.
  3. lwaRefreshToken: The refresh token obtained during authorization.
  4. awsAccessKeyId: Your AWS access key ID.
  5. awsSecretAccessKey: Your AWS secret access key.

Double-check your code to verify that these credentials are being included when initializing the Listings Items API. If this step is missed or configured incorrectly, the API won’t authenticate your requests, leading to the "Access to requested resource is denied" error.

Michael

10
user profile
Roberto_Amazon

Hello! @Seller_lvQuJYcXjzy6E

This is Roberto. Thank you for using the Forums, I wanted to follow up here and highlight the response provided by @Seller_i6S8knzW6zU6Z (Thank you!).

If you still need support, I would encourage you to connect with our Developer Support.

Regards,

10
Follow this discussion to be notified of new activity

Similar Discussions

user profile
Seller_22wAk90Pu3ssy
user profile
Seller_EKP2scPGBrkHP
user profile
Seller_Yb630TV8IJwgK