How to access Graphql from postman or curl

I am getting

{
    "message": "Missing Authentication Token"
}

When i try to access it from Postman or curl or from python requests.
How to access graphql data with access token
How do i use access token to get the graphql data?
My queries are working from inbuilt graphql page

Hi @asreeram1729 ,

Welcome to the Prismic community.

Unfortunately, it is a bit complicated for Postman to efficiently make calls to Prismic GraphQL since Prismic uses the GET HTTP method.

That means you would probably not be able to import your GraphQL schema to Postman to allow for auto-complete.

And to make a call from Postman, you would need the access token and prismic ref.
You can get the access token from the URL when accessing to your-repo-name.prismic.io/graphQL, such as:

And to one way to get the Prismic ref is by opening the browser console and making a request; then, you will be able to find the ref in the request header, such as:

And then you can add that info in Postman as the following:

Also, you would need to add your query in the params, such as:

Finally, you can use a tool to encode your query before adding it as a query parameter to a URL-encoded format using a tool such as this, such

Please let me know if you need any further clarifications.

Best,
Fares

Thank you so much for clarifying this. This means a lot to me
At our workplace we were using prismic for 3 yrs now. But the dev at start of migration to prismic used python library prismicio instead of using prismic-cli and other amazing tools you have using frameworks like React and express.
But we have an issue with python library for prismic since it is restricting us to use only python 3.6.9 which is not okay with our senior devs.
So i want to implement graphql with python instead of completely switching to other framework so i was trying to get data from postman to test it and implement from python requests

Thank you

1 Like

Perfect, Thanks for letting us know.

Can you include this in your documentation?
I think it may help others in future

I have forwarded this to our documentation team, but I'm not sure we will include this in our documentation where the forum sees a better fit for this.