API keys and secrets allow your application to authenticate with Sprinklr APIs. After you create an API key and secret, you can generate an access token and start making API requests.
Make sure that you:
- Have access to the Sprinklr Developer Portal.
- Have the required permissions to create API credentials.
- Know the environment (
{env}) that you want to connect to.
- Sign in to your Sprinklr Environment.
- Navigate to Developer Tools.
- Select Create App or open an existing application.
- In the application's Credentials section, select Generate API Key.
- Copy the generated:
- API Key
- API Secret
- Store the API key and secret securely. You will use them to generate access tokens for API authentication.
Note: Key generation is no longer available in the Developer Portal. To generate or manage keys, use the Developer Tools options available in the Sprinklr platform as mentioned in document below. To view keys previously generated through the legacy Developer Portal, click here For detailed information on API Key and Secret generation, refer to, Developer Tools in Sprinklr
Use your API key and secret to generate an access token through the supported authentication flow.
After you receive the access token, include it in the Authorization header when making API requests.
After generating your API key, secret, and access token, you can verify your setup by making a simple API request.
Send a GET request to the /me endpoint to retrieve information about the authenticated user.
curl -X GET \
'https://api3.sprinklr.com/{env}/api/v2/me' \
-H 'Authorization: Bearer {token}' \
-H 'cache-control: no-cache' \
-H 'key: {apikey}'| Parameter | Description |
|---|---|
{env} | The Sprinklr environment that you want to access. |
{token} | The access token generated through authentication. |
{apikey} | Your Developer Portal API key. |
A successful request returns information about the authenticated user.
{
"data": {
"name": "Shivangi Singh",
"customerId": 66000000,
"id": 66014640,
"type": "PARTNER_ADMIN",
"email": "shivangi.singh@sprinklr.com",
"properties": {
"_c_65b8a60cb6c96a319161e7c6": [
"No"
],
"_c_650c385a2b5a8629918ace0b": [
"DEFAULT VALUE - ENGLISH"
]
},
"workspaceId": 66000002
},
"errors": []
}| Field | Description |
|---|---|
name | Name of the authenticated user. |
customerId | Unique identifier of the customer account. |
id | Unique identifier of the user. |
type | User role or account type. |
email | Email address associated with the account. |
properties | Custom user properties configured in the platform. |
workspaceId | Identifier of the workspace associated with the user. |
errors | List of errors returned by the API. An empty array indicates a successful request. |
If the request succeeds, the API returns your user details in JSON format. This confirms that:
- Your API key is valid.
- Your access token is valid.
- Your application can successfully communicate with Sprinklr APIs.
[!NOTE] Congratulations! You have successfully made your first API call and retrieved data from the Sprinklr platform.
Now that authentication is configured, you can:
- Explore additional Sprinklr API endpoints.
- Retrieve business data from your environment.
- Build integrations and automation workflows.
- Review API documentation for supported resources and operations.