function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shivam Kapoor 33Shivam Kapoor 33 

Salesforce DemandWare Api issue

I am getting access token from their basic oauth but after that when i am using this under (Sandbox create api) i am getting this error every time
{ "error": "invalid_token", "error_description": "ffHTMdYh47mM0NbphjkCjdL4nYU" }
my basic oauth code in image:

https://i.stack.imgur.com/Laiza.png


my create on-demand sandbox request in image

https://i.stack.imgur.com/D5raz.png

my json body : { "realm": "****", "ttl": 24, "settings": { "ocapi": [ { "client_id": "**********************", "resources": [ { "resource_id": "/", "methods": [ "get", "post", "put", "patch", "delete" ], "read_attributes": "()", "write_attributes": "" } ] } ], "webdav": [ { "client_id": "**************", "permissions": [ { "path": "/cartridges", "operations": [ "read_write" ] }, { "path": "/impex", "operations": [ "read_write" ] } ] } ] } }
please help me...
SwethaSwetha (Salesforce Developers) 
HI Shivam,Which flow are you using?
Shivam Kapoor 33Shivam Kapoor 33
Hello Swetha, Thank you for your response. We want to create on-demand sandbox in b2c salesforce commerce cloud using custom integration As per my screenshots you can see I am able to generate access token from basic oauth but when i try to use this in sandbox main api It is not working. can you please let me know what should be the issue. Some document reference https://documentation.b2c.commercecloud.salesforce.com/DOC4/index.jsp?topic=%2Fcom.demandware.dochelp%2FOCAPI%2Fcurrent%2Fusage%2FOAuth.html https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2FSandboxes%2FWhatIsODSandbox.html
SwethaSwetha (Salesforce Developers) 
HI Shivam,
I would recommend you to reach out to "
B2C Commerce " page on https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F93A000000DGi3SAG for inputs on your ask.
 
You can also log a case with salesforce support.
Link: https://help.salesforce.com/articleView?id=workcom_contact_support.htm&type=5 (https://help.salesforce.com/articleView?id=workcom_contact_support.htm&type=5)
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.Thank you