ⓘ Contentsquare is deprecating API keys starting July 14th, 2023.
-
API keys will soon, no longer be supported.
-
Applications that still use API keys after April 30th, 2024 will stop working:
- Raw Data and Metric APIs
- Looker Studio connector
- Qualtrics extension (embedded Session Replay player)
- J+Report (Reeport)
- Dexem
- To replace existing API keys follow these migration instructions.
OAuth credentials will allow you to authenticate Contentsquare's public APIs (Metrics API and Raw Data API)
These credentials consist of a pair: client_id
and client_secret
that must be provided to a specific authentication endpoint.
The authentication endpoint will return two key elements:
-
A valid JWT token used to query Contentsquare metrics and raw data endpoints
-
A base URL for all Contentsquare API endpoints, that is dynamic and depends on your unique cloud hosting (AWS vs. Azure and region)
You can generate credentials at either of two levels:
-
Account-level, will allow for requesting resources for any project attached to the account the credentials are generated from.
-
Project-level, will allow for requesting resources only for the specific project the credentials are generated from.
How to create credentials
1. Go to settings '⚙️' > 'Console'
2. Choose account or project level, go to the 'API Credentials' tab, and then click 'Create account credentials'.
- Choose account-level or project-level based on whether you want credentials with access to all projects on an account or only a specific one.
- You will find the same 'API Credentials' tab at both the account level and project level.
- For project-level: Go to the project > 'API credential' tab > 'Create account credentials'
- For account-level: Go to the account > 'API credential' tab > 'Create account credentials'
- If you already have credentials created your 'Create account credentials' button will be in the Credential list's top-right corner.
3. Fill in the OAuth credentials information: name of your credentials and list of IPs that can use them (by default any IP) and click 'Create account/ project credentials'.
- If you need to provide a whitelist of specific IPs select 'Allow specific IP addresses' and list all the IPs you want to whitelist (in either IPv4 or IPv6 format) and then click 'Create account/ project credentials'.
4. A pop-up will appear with your generated OAuth credentials. Store your credentials in a secure place. This is the last time they will be displayed and Contentsquare does not store them for security reasons. Click 'I copied my credentials'.
5. You will be redirected to the API credentials tab view where your new credentials will be listed. You can now use these credentials to query Contentsquare’s public APIs.
How to regenerate OAuth credentials
1. Go to 'Console' > 'API Credentials' tab > '...' more options menu > 'Regenerate credentials'2. Read the confirmation message prompt and click 'Regenerate credentials'.
3. Your new credentials will appear in a pop-up, use them to update any existing credentials in-use. Regenerated credentials will make the prior credential for that connection invalid.
- Copy and store the
client_secret
as you will not be able to view again or recover later and click 'I copied my credentials'.
How to edit OAuth credentials
1. Go to 'Console' > 'API Credentials' tab > '...' more options menu > 'Edit credentials'
2. The credentials configuration form will open. You can edit the name, description, and list of whitelisted IPs and click 'Edit account credentials' to save.
How to revoke credentials
1. Go to 'Console' > 'API Credentials' tab > '...' more options menu > 'Revoke credentials'.
2. Read the pop-in confirmation message reminding you that revoking credentials in use my break the application. Click 'Revoke credentials'.
3. Your credentials will be deleted from the list of credentials and cannot be used anymore to query Contentsquare’s public APIs.