The Salesforce Commerce API (SCAPI) endpoints for B2C Commerce may return a 403 Forbidden error that says: "Your access-token is valid, but you have no permissions to access the resource".
Example:
{"type":"https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
"title":"Forbidden",
"detail":"Your access-token is valid, but you have no permissions to access the resource."}
The 403 Forbidden error occurs when the scopes for the SCAPI endpoints being used are not correctly defined. These should be checked to see if the view only or read/write scope is needed. For example:
sfcc.promotions - View promotions
sfcc.promotions.rw - Create, update, or delete promotions
If only view access is provided in the scope, any attempt to update the resource will result in the 403 error. More information about how this affects the APIs is below:
When this occurs for the Shopper APIs, the scopes set for the Shopper Login and API Access Service (SLAS) client also needs to be reviewed. This can be checked in the SLAS Admin UI which can be accessed via https://{{short-code}}.api.commercecloud.salesforce.com/shopper/auth-admin/v1/ui/.
Note: {{short-code}} in the URL above needs to be updated with the value corresponding to your instance.
000395025

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.