Project tokens
Project tokens are used to fetch and query content from the Content API. They differ from API keys in that they can not be used to manage your projects, they are read-only tokens used to fetch published content.
Project tokens are associated with environments. Each token can be associated with a single environment, however, each environment can have many tokens. For example, you may have separate tokens for your development, staging, and production environments.
For additional security, tokens can be restricted by IP address, custom headers, or a secret. Tokens allow access from anywhere by default.
Lists all project tokens
Required attributes
None |
Optional attributes
None |
Request
Response
Fetches a single token based on the provided token ID
Required attributes
projectId | string | Your project ID |
tokenId | string | Your token ID |
Optional attributes
None |
Request
Response
Retrieves logs associated with a project token. These logs provide information on where the request to your content comes from and contains information on the requestor such as user agent, geo location information, and the query used along with the token.
Required attributes
projectId | string | Your projectId |
tokenId | string | Your token ID |
Optional attributes
None |
Request
Response
Creates a new project token
Required attributes
projectId | string | Your projectId |
title | string | Name for your token |
Optional attributes
description | string | Description for your token |
disabled | boolean | Disable token from being used |
environment | string | The ID of the environment to associate with the token |
Request
Response
Update attributes for an existing project token
Required attributes
projectId | string | Your projectId |
tokenId | string | Your token ID |
Optional attributes
title | string | Name for your token |
description | string | Description for your token |
disabled | boolean | Disable token from being used |
environment | string | The ID of the environment to associate with the token |
ipRestrictionsEnabled | boolean | Enable or disable IP restrictions on the token |
ipValues | string[] | An array of IPv4 and / or IPv6 addresses |
secretKeyEnabled | boolean | Enable or disable secret key for token |
secretKey | string | 12+ character secret key to associate with the token |
Request
Response
Delete's a project token
Required attributes
projectId | string | Your projectId |
tokenId | string | Your token ID |
Optional attributes
None |
Request
Response