Skip to main content

Authorization

Follow this guide to create a new Contentstack credential that will allow Nexla to authenticate to and exchange data with your Contentstack account.
contentstack_api_auth.png

Contentstack

Prerequisites

To connect Nexla to Contentstack's Content Delivery API, you need access to a Contentstack stack and two pieces of read-only authentication information: the Stack API Key and a Delivery Token for the environment you want to read from. The Content Delivery API serves published content, so the credential you create is read-only by design and cannot modify content in your stack.

Only stack owners, developers, and admins can create delivery tokens. If you do not have one of these roles in the stack, ask a stack administrator to provide the API Key and a Delivery Token, or to grant you the appropriate role.

Retrieve Your Stack API Key

The Stack API Key uniquely identifies the stack that Nexla will read content from.

  1. Log in to your Contentstack account and open the stack you want to connect.

  2. Navigate to Settings > Stack.

  3. Under the API Credentials section on the right-hand side of the page, copy the API Key value.

Create or Retrieve a Delivery Token

A Delivery Token is a read-only credential scoped to a specific publishing environment (for example, production or staging). It controls which environment's published content Nexla can fetch.

  1. In your stack, navigate to Settings > Tokens > Delivery Tokens.

  2. To use an existing token, select the delivery token that corresponds to the publishing environment you want to read from. To create a new token, click + New Token, enter a name and description, select the target environment, and click Generate Token.

  3. At the bottom of the token page, copy the Delivery Token value, and note the Environment name associated with the token.

    In the Content Delivery API, the Delivery Token value is passed as the access_token header. While requests may also work with a legacy Access Token, Contentstack has deprecated Access Tokens for new stacks and strongly recommends using Delivery Tokens for fetching published content.

Identify Your Region Base URL

Contentstack hosts stacks in several regions, and the Content Delivery API base URL differs by region. Confirm the region of your stack so that you select the correct base URL when configuring the credential. For complete details, see the Contentstack API endpoints documentation.

For complete reference information, see the Contentstack Content Delivery API documentation and the overview of tokens.

Create a Contentstack Credential

  • To create a new Contentstack credential, after selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

Credential Name & Description

  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

    Resource descriptions are recommended but are not required. They should be used provide information about the resource purpose, data freshness, etc. that can help the owner and other users efficiently understand and utilize the resource.

Authentication Settings

Contentstack authenticates Content Delivery API requests using your Stack API Key together with an environment-specific Delivery Token. Provide the following values, all of which are obtained in the Prerequisites section above.

  1. Select the Base URL that matches the region where your Contentstack stack is hosted. This is the host that Nexla sends Content Delivery API requests to. Available options include:

    • Production API (api.contentstack.io) – AWS North America region
    • CDN (cdn.contentstack.io) – AWS North America CDN endpoint, optimized for faster content delivery
    • EU API (eu-api.contentstack.com) – AWS Europe region
    • Azure NA (azure-na-api.contentstack.com) – Azure North America region

    Select the base URL that corresponds to the region of your stack. Requests sent to the wrong regional host will fail authentication. The CDN host is recommended for high-volume read workloads.

  2. Enter your stack's API Key in the API Key field. This value identifies the stack that Nexla will read content from. It is stored securely and is not displayed after the credential is saved.

  3. Enter your Delivery Token in the Delivery Token field. This read-only token authorizes Nexla to fetch published content for a specific environment and is sent as the access_token header on each request. It is stored securely and is not displayed after the credential is saved.

  4. Enter the publishing environment name in the Environment field (for example, production). This must match the environment associated with the Delivery Token entered above and determines which published version of your content Nexla retrieves. If left blank, the default value production is used.

    The Environment value must match the environment that the Delivery Token was created for. A Delivery Token only grants access to the published content of the environment it is scoped to.

Save the Credential

  1. Once all of the relevant steps in the above sections have been completed, click the Save button at the bottom of the overlay to save the configured credential.

  2. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation and can be selected for use with a new data source or destination.