Shopify GraphQL issue

RiadhMa
Tourist
6 0 2

Hello,

What's wrong with Shopify GraphQl API? the queries were working fine and suddenly I got only errors "HTTPError: Response code 401 (Unauthorized)" !

I even wanted to test it with Shopify GraphQL app, but it also doesn't open.. 


Need help urgent!


0 Likes
_JB
Shopify Staff
Shopify Staff
834 98 182

Hey @RiadhMa,

401 Unauthorized usually means the API key/secret is missing or invalid. Make sure the API client you're using is sending the auth credentials. If you're still having trouble with it, please provide the X-Request-ID value from the response headers of your call, and I'll use this to get more information from our logs. 

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
RiadhMa
Tourist
6 0 2

Hi @_JB Thank you for your reply.
Actually I'm using GraphQL in shopify-node-api, I don't know if it's possible to provide the X-Request-ID there.
Can you look into it with other info?

0 Likes
_JB
Shopify Staff
Shopify Staff
834 98 182

Hey @RiadhMa,

I can try to find it if you provide a rough timestamp, the shop_id/URL you're making the call to, and the id of your app. The app id is the last set of numbers in the URL when viewing your app in the partner dashboard.

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
RiadhMa
Tourist
6 0 2

Hey @_JB 
I just wrote you a message with the infos.

0 Likes
_JB
Shopify Staff
Shopify Staff
834 98 182

It turns out GET requests to the GraphQL endpoint result in a 401 - Unauthorized error as well. As a reminder all GraphQL requests should use the POST method.

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes