Problem in Netlify build - Contentful access token not provided

Hi all.
I’ m encountering the following error in building (locally it works).

I have set the env variables on Netlify:


Any idea how to solve this?

Thank you in advance.

Have you ensured they are allowed in the correct environment? This is important if you are trying to deploy a branch or deploy preview

1 Like

Hi, thanks for your reply.
I’ve allowed them in all the environments.

Make sure you’ve read the docs regarding Contentful integration.

I’m not 100% on how the env variables are passed to contentful but in the docs it talks about using snippet injection

Hey @kylesloper.
The actual problem was that I made a mistake between the CONTENTFUL_ACCESS_TOKEN and the CONTENTFUL_DELIVERY_TOKEN. After fixing this on Netlify, it worked.
Thank you anyway.

1 Like

Glad it’s working. Thanks for coming back and updating :netliheart: