Hi all,
I've faced the error when I am adding a Customer node to a request. Despite that "read_customers" access is enabled for the account, error "acced_denied" appeared. Please explain why it is happening? What additional permission is needed?
My request bellow
{ orders (first: 20, query:"processed_at:>2019-12-06 processed_at:<2019-12-20") { pageInfo { hasNextPage hasPreviousPage } edges { node { id name createdAt processedAt displayFinancialStatus cancelReason cancelledAt currencyCode test publication { name } customer { id lastName firstName email } transactions (first:10) { id createdAt authorizationCode kind gateway amountSet { shopMoney { amount currencyCode } } errorCode test status } customerJourney { moments { ... on CustomerVisit { utmParameters { source campaign content medium term } } } } refunds (first:10) { id createdAt totalRefundedSet { shopMoney { amount currencyCode } } } totalPriceSet { shopMoney { amount currencyCode } } subtotalPriceSet { shopMoney { amount currencyCode } } totalRefundedSet { shopMoney { amount currencyCode } } } } } }
Piece of API response, where error is shown
{ "message": "access denied", "locations": [ { "line": 21, "column": 9 } ], "path": [ "orders", "edges", 2, "node", "customer" ] }, { "message": "access denied", "locations": [ { "line": 21, "column": 9 } ], "path": [ "orders", "edges", 3, "node", "customer" ] },
Thanks for your attention!
Hey @Damir1,
Do you have read order permissions? Are you able to provide the shop URL or a request ID from the headers?
Hi,
yes sure, Shop URL: Helm.myshopify.com
All scopes that I have
{ "access_scopes": [ { "handle": "read_orders" }, { "handle": "read_products" }, { "handle": "read_analytics" }, { "handle": "read_product_listings" }, { "handle": "write_customers" }, { "handle": "write_checkouts" }, { "handle": "read_content" }, { "handle": "read_all_orders" }, { "handle": "read_customers" }, { "handle": "read_checkouts" } ] }
I had got it with REST admin API endpoint /admin/oauth/access_scopes.json
I suppose that scopes the same both Graph and REST API.
Hey @Damir1,
Are you using the right key? The query is working on my end using the key from app 2839213.
If you're still stuck, please let me know a request ID from the response headers.
Hey @SBD_,
Seems that it somehow depends on the time when data requested.
X-Request-Id was 1f9e9ce7-becd-4643-b6c9-a2ddac400688, where I saw the error last time. Today I've run the same request and actually, no errors appeared.
But I've changed request params to orders (first: 20, query:"processed_at:>2019-12-20 processed_at:<2019-12-23") and again seing the error
New X-Request-Id = 66c70dee-ff5c-4537-96e4-e8f881316948
Full API response placed here https://drive.google.com/file/d/1RUCMsqf6R2bYP00qwbCHl8m-px_hPM8T/view?usp=sharing
Please advise!
User | Count |
---|---|
12 | |
11 | |
10 | |
8 | |
5 |