Delivery Tokens are read-only credentials used with a stack's API key to retrieve published content from a specific environment via the Content Delivery API. These tokens provide secure and restricted access to content within that environment.
Note: The number of Delivery Tokens you can create depends on your plan. You can contact Contentstack support to increase the limit.
Now that we’ve covered Delivery Tokens for accessing published content in specific environments, let’s explore how Preview Tokens build on that foundation to enable real-time content previews.
Preview Tokens are credentials that allow users to get live preview data from their website’s preview panel. They are linked to a Delivery Token and can be generated by anyone with access to your stack settings.
You must create a Delivery Token before enabling the Preview Token feature. For existing Delivery Tokens, a Preview Token can be generated using the option provided within the Contentstack App or via a Create a Preview Token request.
Note: Preview Tokens are exclusively limited to the rest-preview.contentstack.com endpoint to ensure that they are used solely for retrieving live preview data. They are not compatible with other endpoints.
Consider a scenario where a content team is preparing articles for publication. To ensure quality and accuracy, you set up a dedicated staging environment that allows team members to preview draft content before it goes live.
In this workflow:
Editors and QA testers can view how the unpublished content appears on the staging site by accessing the preview panel via the rest-preview.contentstack.com endpoint.
This process allows stakeholders to collaborate in real time and to address potential issues such as formatting errors, broken links, or incorrect data before publishing. It streamlines editorial and testing workflows, ensuring that content is reviewed thoroughly without being exposed to the production environment.