Customer Data Read Scope Issue when running GraphiQL Shopify App

Customer Data Read Scope Issue when running GraphiQL Shopify App

sawarn
Shopify Partner
1 0 0

Hi Folks!
I am trying to test a simple query in the Shopify GraphiQL App in my testing store. While I have given all the permissions to my testing store to read the customer data. I am getting error while running the following query.

query ($query: String!) {
customers(first: 1, query: $query) {
edges {
node {
id
}
}
}
}


Error:

{
"errors": [
{
"message": "Access denied for customers field.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"customers"
],
"extensions": {
"code": "ACCESS_DENIED",
"documentation": "https://shopify.dev/api/usage/access-scopes"
}
}
],

Can Someone please help and guide what to do to resolve this?

Reply 1 (1)

PageFly-Richard
Shopify Partner
4854 1091 1764

Hi,
This is Richard at PageFly - Shopify Advanced Page Builder app.

 

The error message "Access denied for customers field" indicates that the GraphiQL app in your testing store doesn't have the necessary permissions to access customer data. Here's how to resolve this:

1. Grant Read_Customers Permission:

  • Go to your Shopify admin panel.
  • Navigate to Apps & sales channels.
  • Find the GraphiQL app in your list of installed apps.
  • Click on the app to open its settings.
  • Under Permissions, ensure the Read Customers permission is checked.
  • Click Save.

2. Re-run the Query:

Once you've granted the Read Customers permission, go back to your GraphiQL app and re-run your query. It should now successfully retrieve customer data (specifically, the ID of the first customer matching your search criteria).

 

Hoping my solution helps you solve your problem.
Best regards,
Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.