I am trying to request shopify graphql-admin-api from my api. I am doing it according to the documentation given by graphql-admin-api, but it still gives me authorization errors.
I am trying to request shopify graphql-admin-api from my api. I am doing it according to the documentation given by graphql-admin-api, but it still gives me authorization errors.
2
Answers
PHP users can follow this function to make request to Shopify Admin API using GraphQL
I am using GuzzleHttp ( PHP HTTP client ) to create request
Below code can help you to check how much cost this graphQL query
Go to Apps -> Manage Apps at the bottom and then :
Create a private app in Shopify, which will connect to your application. Make sure you manage permission for what you want to query
After creating the private app you will get the password which you can use as the token for your HTTP requests with header ‘X-Shopify-Access-Token’ value: password
For more visit: https://shopify.dev/docs/admin-api/getting-started#authentication
The way I use in NodeJS is by using package "graphql-request" to make requests and