Access denied for locations field denied

Hi,

I am requesting access to the Shopify read location scope. As of 10/30, it appears I do not have the read locations. Here is my query:

query ShopShow {{
shop {{
id
name
email

}}
locations (first: 10) {{
    edges {{
        node {LocationObject.Query}
    }}
}}

}}";

URL

scope=read_locations%2Cread_shopify_payments_accounts%2Cread_shopify_payments_payouts%2Cwrite_draft_orders%2Cread_draft_orders%2Cread_all_orders%2Cwrite_inventory%2Cwrite_products%2Cwrite_orders%2Cread_products%2Cread_product_listings%2Cwrite_product_listings%2Cread_fulfillments%2Cwrite_fulfillments%2Cread_assigned_fulfillment_orders%2Cwrite_assigned_fulfillment_orders%2Cread_third_party_fulfillment_orders%2Cwrite_third_party_fulfillment_orders%2Cread_merchant_managed_fulfillment_orders%2Cwrite_merchant_managed_fulfillment_orders%2Cread_customers%2Cread_returns%2Cread_payment_terms%2Cwrite_returns%2Cwrite_payment_terms&redirect_uri=x

Error

Access denied. [{“Locations”:[{“Column”:5,“Line”:85}],“Message”:“Access denied for locations field.”,“Path”:[“locations”],“Extensions”:{“code”:“ACCESS_DENIED”,“documentation”:“https://shopify.dev/api/usage/access-scopes”}}]

1 Like

Hey @Joseph_Anderson, the location object does require those scopes: Location - GraphQL Admin

Additionaly, the shop.locations connection is deprecated, so I would recommend switching to a queryroot

Thanks for the follow up. When I generate the key, I have read_locations scope: scope=read_locations. Any other ideas? Here is my app: Connex Ecommerce - Sync Shopify with QuickBooks, Xero, Sage, Odoo & Zoho | Shopify App Store

The scopes are in the URL. When we call query {
currentAppInstallation {
accessScopes {
handle
description
}
}
}

the access scopes are empty. We recently changed our URL. Would that change anything?

I figured it out. Go to the dev dashboard. Go to versions. Select use legacy scopes. Enter a comma separated list of scopes for your app. Include read_locations. Ensure the app URL and redirect URL are different.

2 Likes

Hey Joseph, thanks for sharing that fix!