Get Client ID and Client Secret with an API App
Developers can create an API Client to obtain a Client ID and Client Secret, which are generate access and refresh tokens. Depending on the release version, the Client ID and Client Secret generated through the API Client can be used in two ways:
-
For Q2 '25 release or later: The grant_type can be either client_credentials or password. It is recommended to use grant_type="client_credentials", as it is more secure and eliminates the need to reveal your username and password in the API call.
NOTE: : You cannot use grant_type="client_credentials" with an API client created before the Q2 '25 release, even if your instance has been updated. To use grant_type="client_credentials", you must upgrade your SearchUnify instance to Q2 '25 or later and create a new app.
CopyObtain Access and Refresh Tokenscurl -i -X POST 'http://yourinstance/oauth/token' \
-H "authorization: Basic Base64(clientId: clientSecret)" \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials' -
For Q1 '25 release or earlier releases: The only available option is to use password as the grant_type with the Client ID and Client Secret linked to your API client.
CopyObtain Access and Refresh Tokenscurl -i -X POST 'http://yourinstance/oauth/token' \
-H "authorization: Basic : Basic Base64(clientId: clientSecret)"\
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'grant_type=password&username=you@yourcompany.com&password=yourpassword'
Steps to Generate Client ID and Client Secret
- Log in to your SearchUnify account.
- In the left navigation bar, scroll down and click on API.
-
In API Clients, click on the Create New API Client button.
-
Enter the required details:
- Name. Give your API client a label for identification.
- Redirect URL. Enter the following URL:
https://oauthsfdc.searchunify.com
. -
Select Scope. Choose the appropriate scope to authorize the app to access specific data. The available options are:
-
All: Select this option to access all SearchUnify services through the API.
-
Analytics: Select this option to access SearchUnify analytics data through the API.
-
Content: Select this option to manage content sources through the API.
-
None: Select this option to prevent API access for the user.
-
Search: Select this option to use search services through the API.
-
SUVA: Select this option to interact with a SUVA chatbot.
-
SearchUnifyGPT: Select this option to interact with SearchUnifyGPT through the API.
-
- Click Save.
Once you've completed the form, the Client ID and Client Secret will be generated.
You can view the Client Secret by clicking the eye icon.
You can delete the API app by clicking the delete icon.