How to make a GraphQL query with an Authorization Bearer Token in Postman

Oscar de la Hera Gomez
Two flowers that represents GraphQL and Postman side by side. Beneath them sits the text "GraphQL API Call with Authorization Token."

A step by step tutorial on making a GraphQL API that uses an authorization bearer token in Postman.

The following tutorial walks you through how to make a GraphQL API call that uses an authorization token in Postman to gather Subscribers from a Craft CMS.

It assumes that you have setup your server to work with GraphQL, that there is a schema with relevant data for it to read and that it uses a token. For tutorials on how to do so in Craft CMS, please consult the links below.

Step One: Determine your Query

A screenshot of the GraphiQL with our subscriber query.

Navigate to the GraphiQL of your server and use the explorer to create a query.

Step Two: Setup Postman

A screenshot of Postman with us having set the request type to POST and the URL to that of our GraphQL API.

Open Postman and create a new HTTP request that makes a POST request to your GraphQL API.

Step Three: Setup Authorization Bearer Token

A screenshot of Postman showing how to setup the authorization bearer token. Highlighted are the "Authorization" tab, the Type dropdown with the type set to "Bearer Token" and the Token input box.

Select the Authorization tab.

Subsequently select Bearer Token from the Type dropdown.

Finally, add your token in the Token input.

Step Four: Set the GraphQL query

A screenshot of Postman showing how to set the GraphQL Query. Highlighted are the "body" tab, the "GraphQL" radio button and the Query area.

Select the Body tab.

Subsequently select GraphQL from the underlying radio buttons.

Finally, add your GraphQL Query in the Query section.

Step Five: Send

A screenshot of Postman with a highlight on the "Send" button that is found on the top right.

Press the Send button on the top right.

The response will appear beneath the GraphQL Query.

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.

delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details