Does GC require both the CONTENTFUL_ACCESS_TOKEN and CONTENTFUL_PREVIEW_ACCESS_TOKEN in the Preview variables block? My previews are failing if the content access token is not included. Documentation on gatsbyjs.com states that the content access token is not required. Clarification on this matter would be appreciated.
Gatsby Cloud would soon be sunsetting. Thus, it’s better to migrate your website to Netlify to receive continued updates and support.
As far as the issue is concerned, the docs say that the
CONTENTFUL_ACCESS_TOKEN is required:
None of that mentions optional.
Preview build only works with CONTENTFUL_ACCESS_TOKEN populated.
- "accessToken" is required
Thanks for following up! As Hrishikesh alluded to, only the preview environment variables listed in this documentation are required.
The important thing is to ensure the values supplied in your site’s environment variables accurately reflect the correct values for your
Content Delivery Token (Builds) and
Content Preview Token (Previews) that are listed in your Contentful Space. Please reach out with any questions!