{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Generate an API Key and Secret","description":"Sprinklr offers robust, convenient, and simple RESTful Web service APIs to integrate data from Sprinklr to any external system.","keywords":["Sprinklr API","Sprinklr Developer Portal","OAuth 2.0","RESTful API","Social Media API","Customer Experience API","Unified-CXM","Social Listening API"]},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"generate-an-api-key-and-secret","__idx":0},"children":["Generate an API Key and Secret"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["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."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"before-you-begin","__idx":1},"children":["Before You Begin"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make sure that you:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Have access to the Sprinklr Developer Portal."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Have the required permissions to create API credentials."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Know the environment (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{env}"]},") that you want to connect to."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"generate-an-api-key-and-secret-1","__idx":2},"children":["Generate an API Key and Secret"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sign in to your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sprinklr Environment"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Developer Tools"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create App"]}," or open an existing application."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the application's ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credentials"]}," section, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Generate API Key"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Copy the generated:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Key"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Secret"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Store the API key and secret securely. You will use them to generate access tokens for API authentication."]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["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, ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://dev.sprinklr.com/accounts/login"},"children":["click here"]}," ","For detailed information on API Key and Secret generation, refer to, ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.sprinklr.com/help/articles/developer-tools/developer-tools-in-sprinklr/692e8b39f0afa271d18a5929"},"children":["Developer Tools in Sprinklr"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"generate-an-access-token","__idx":3},"children":["Generate an Access Token"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use your API key and secret to generate an access token through the supported authentication flow."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After you receive the access token, include it in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," header when making API requests."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"make-your-first-api-call","__idx":4},"children":["Make Your First API Call"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After generating your API key, secret, and access token, you can verify your setup by making a simple API request."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Send a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET"]}," request to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/me"]}," endpoint to retrieve information about the authenticated user."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"request","__idx":5},"children":["Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X GET \\\n    'https://api3.sprinklr.com/{env}/api/v2/me' \\\n    -H 'Authorization: Bearer {token}' \\\n    -H 'cache-control: no-cache' \\\n    -H 'key: {apikey}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"request-parameters","__idx":6},"children":["Request Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{env}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Sprinklr environment that you want to access."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{token}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The access token generated through authentication."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{apikey}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your Developer Portal API key."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"response","__idx":7},"children":["Response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A successful request returns information about the authenticated user."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"data\": {\n    \"name\": \"Shivangi Singh\",\n    \"customerId\": 66000000,\n    \"id\": 66014640,\n    \"type\": \"PARTNER_ADMIN\",\n    \"email\": \"shivangi.singh@sprinklr.com\",\n    \"properties\": {\n      \"_c_65b8a60cb6c96a319161e7c6\": [\n        \"No\"\n      ],\n      \"_c_650c385a2b5a8629918ace0b\": [\n        \"DEFAULT VALUE - ENGLISH\"\n      ]\n    },\n    \"workspaceId\": 66000002\n  },\n  \"errors\": []\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"response-fields","__idx":8},"children":["Response Fields"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name of the authenticated user."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unique identifier of the customer account."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unique identifier of the user."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User role or account type."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Email address associated with the account."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["properties"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom user properties configured in the platform."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["workspaceId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Identifier of the workspace associated with the user."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errors"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of errors returned by the API. An empty array indicates a successful request."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"verify-the-result","__idx":9},"children":["Verify the Result"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the request succeeds, the API returns your user details in JSON format. This confirms that:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your API key is valid."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your access token is valid."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your application can successfully communicate with Sprinklr APIs."]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["[!NOTE]"," ","Congratulations! You have successfully made your first API call and retrieved data from the Sprinklr platform."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":10},"children":["Next Steps"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now that authentication is configured, you can:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Explore additional Sprinklr API endpoints."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Retrieve business data from your environment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Build integrations and automation workflows."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Review API documentation for supported resources and operations."]}]}]},"headings":[{"value":"Generate an API Key and Secret","id":"generate-an-api-key-and-secret","depth":1},{"value":"Before You Begin","id":"before-you-begin","depth":2},{"value":"Generate an API Key and Secret","id":"generate-an-api-key-and-secret-1","depth":2},{"value":"Generate an Access Token","id":"generate-an-access-token","depth":2},{"value":"Make Your First API Call","id":"make-your-first-api-call","depth":1},{"value":"Request","id":"request","depth":2},{"value":"Request Parameters","id":"request-parameters","depth":3},{"value":"Response","id":"response","depth":2},{"value":"Response Fields","id":"response-fields","depth":2},{"value":"Verify the Result","id":"verify-the-result","depth":2},{"value":"Next Steps","id":"next-steps","depth":2}],"frontmatter":{"seo":{"title":"Generate an API Key and Secret"}},"lastModified":"2026-09-28T11:53:28.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/authentication","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}