Request with GraphQL with 403


I ran my test first on GraphQL API Explorer and then on Insomnia.

Unfortunately when i run it on Insomnia with the endpoint as it explain in the documentation i got a 403 response. (In precision i have the bearer token in the auth configurations)

After hunting for an answer for my problem, i saw some topics where the people used (without the .cdn so) and it's worked.
The query is now in the url with the param query

And i needed to put my ref also


My question is simple, is it the right way to fetch data and the doc (Fetch Data with GraphQL - Documentation - Prismic) is not updated?
Or did i miss something...

Hello @steven.renaux

Welcome to the Prismic community, and thanks for reaching out to us.

That's the documents for graphql fetch data, although it needs some updates because of the error. We will update it soon. Are you getting any other issues?

Thanks for pointing this out.


I have same problem with 403. Always that i've made a change on a custom type i got a 403 when i tried to fetch new fields added from my project (using urql + @prismicio/client).

However in the graphql playground is working well. I've checked both callls and both have same ref.

Hello @queverendias

Are you caching ref in your project? An old ref can cause a 403 error. A new ref generates and fetches data whenever you make changes in the repository. In Prismic's development kits, like @prismicio/client, every query involves two requests — one for the ref and another for the content. If you are caching the ref, it can throw a 403 error.

I am looking forward to hearing from you back.


1 Like