Setting Up OAuth with Retail Cloud's APIs
Retail Cloud supports OAuth for secure authentication with APIs and SPIs. Configure the OAUTH-OAuth SPI by entering the required URL, client secret, and headers. This setup allows the system to obtain an authentication token before making any other SPI calls.
To configure OAuth authentication for Retail Cloud APIs, set up the OAUTH-OAuth SPI connector in CMS and then configure your individual SPIs to use the generated authentication tokens. The process involves two main steps: first establishing the OAuth connection, then applying it to your specific API integrations.
- In CMS, go to Integrations > Custom Connectors.
- Click Create.
- For Connector Type, select SPI.
- For Endpoint Name, select OAUTH-OAuth.
- Update the API Endpoint to add
grant_type=client_credentials. For example,https://interdev.my.sf.com/services/oauth2/token?grant_type=client_credentials. - Set the Integration Type to
HTTP_POST. - Specify the authorization key using the JSON Headers.
- Retrieve the Client ID and Client Secret from the external API.
- Generate a Base64 concatenated Client ID and Client Secret, with a colon (:) and a single space.
- Add this string to the JSON Headers.
- Include a space after the word
Basic(don't include a colon). - Generate the basic token by concatenating the Client ID and Client Secret with a colon and space. For example,
client_id: client_secret.
![]()
- In CMS, go to Integrations > Custom Connectors.
- Click Create in the upper right.
- For Connector Type, select SPI.
- For Endpoint Name, select an SPI. For example, SHIPPING_METHOD.
- Navigate to the OAuth Config settings.
- Set the OAuth Header to the header of your choice.
- Set the OAuth API Key to either
OAuthorOAUTH. - Configure the rest of the required fields.
- Save your changes.
