All things Shopify and commerce
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?
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:
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.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024