Tokens

Delivery Tokens provide read-only access to the associated environments. It is a credential—used along with the stack API key—to make authorized Content Delivery API requests for retrieving the published content of an environment.

By default, Contentstack does not provide any delivery tokens. You need to create new tokens for the environments of your stack.

However, one token can be used to fetch content from only one environment. This means that you need to create different tokens for different publishing environments of your stack.

Having separate tokens for different environments ensure that only the specified people have access to the content of the required environments. For example, testers can have fetch content of only the ‘staging’ environment, while content managers have access to the ‘production’ environment. This separation ensures the safety of your content and allows you to manage separate delivery channels independently.

Key points to remember:

  • You can associate a delivery token with only one environment. Consequently, you need to create different tokens for different environments.
  • Delivery tokens can be used to fetch only published content, not unpublished or draft content.
  • You can create a maximum of 20 tokens in a stack.

Create a delivery token

To create a new delivery token, perform the steps given below:

  1. Navigate to Settings > Tokens
  2. Select Add Token.
  3. Provide a relevant Name and Description for the token.
  4. Under Scope, select the Environment for which you want to create this token.
    Generate Token.png
  5. Click Generate Token. You will see a new token in the Delivery Token field.

You will be able to use the generated token to fetch the content of only the selected environment. It cannot be used to fetch the content of any other environment.

Note: Only the stack Owners, Developers, and Admin can create delivery tokens.

Tutorial Video

Let's see how to create a delivery token.

Add a New User.png

Edit a delivery token

To edit the details of the token, follow the steps given below:

  1. Navigate to Settings > Tokens.
  2. Click on the token to edit. 
  3. Edit the details.
    Delivery Token.png
  4. Click Save to save the changes.

Delete a delivery token

To delete an existing delivery token, perform the steps given below:

  1. Navigate to Settings > Tokens.
  2. Hover on the token that you want to delete. On the right side corner, you will notice vertical ellipses. Click on the ellipses and select ‘Delete’ to remove the delivery token.
    Delete a Delivery Token.png
Was this article helpful?
top-arrow