Hey Tom,
I am getting into the OCAPI work. The environment settings and sample collectionfor Postman have been really helpful in getting the Data API going. However, I am stuck on the Get Customer call on the Shop API. In the Shop "{{shop_url}}/customers/{id}" I have the Authorization, Origin, Content Type and x-dw-client-headers set up, and I have the Auth set up to use the Bearer Token. I keep getting this error. I have tried many configs, and nothing let's me into the sandbox. The below error seems to say that I need to authenticate as the customer, but when I try to use the Basic Auth and the user's name and pass I get an error stating I need to use the Bearer token. Do you have any additional resources for setting up the correct headers and Auth type for the Shop API?
{
"_v": "20.4",
"fault": {
"type": "AccessWithoutUserForbiddenException",
"message": "An authenticated user is required in order to access the resource."
}
}
I don't have anything special. Here's the OCAPI landing page from doc: https://documentation.b2c.commercecloud.salesforce.com/DOC1/topic/com.demandware.dochelp/OCAPI/current/usage/GettingStartedWithOCAPI.html For a shopper, you will be mimicking a two step process.
1) The shopper "signs in" to their store account. That's where you use the customer username and password to Request Auth Customer. That request returns a JWT, which will be used for subsequent requests.
2) The shopper does some shopping. That's where you use the bearer token rather than signing in with username and pw again.