Before you can authenticate with the Cognism API, you must generate an API token.
API tokens are used to securely authenticate requests made to the Cognism API. Each request must include a valid API token in the Authorization header.
Before you begin
Before generating an API token, ensure that:
- Your organisation has API access enabled.
- You have permission to manage API tokens.
- Your API Entitlements have been configured.
- You have available Bulk Credits.
For more information, see API Requirements & Entitlements.
Generate a new API token
- Sign in to the Cognism Web Application.
- Click your profile avatar.
- Select Settings.
- Open the Tokens & API tab.
- Click Create New Token.
- Wait for the confirmation message.
Once created, the token will appear in your list of API tokens.
Manage API tokens
Each API token displays:
- Token name
- Date created
- Expiration date
From the token list, you can:
- Copy the token for use in your application or integration.
- Delete the token if it is no longer required.
Using your API token
Include your API token in the Authorization header of every API request.
Authorization: Bearer <YOUR_API_TOKEN>Requests made without a valid token will be rejected.
For complete authentication examples, refer to the Cognism Developer Portal.
Best practices
To help keep your API secure:
- Treat API tokens like passwords.
- Store tokens securely using a secrets manager or environment variables.
- Never include API tokens in source code repositories or public applications.
- Rotate API tokens periodically.
- Delete tokens that are no longer in use.
If your token expires
API tokens have an expiration date.
If a token expires or is deleted:
- Generate a new API token.
- Update your application or integration with the new token.
- Test authentication before resuming production API calls.