Access denied for markets field

Topic summary

Access denied error when querying the Markets field via the Shopify Admin GraphQL API. Store is Shopify Plus (EU) serving multiple marketplaces; the goal is to list markets via the markets query.

What’s verified/tried:

  • OAuth scopes read_markets and write_markets are enabled for the app key; access token confirmed multiple times.
  • Using the cURL example (Admin API) with X-Shopify-Access-Token and application/json.
  • The same query returns results in the GraphQL Explorer, but the API request returns “Access denied for markets field.”

Technical details:

  • GraphQL endpoint shown uses version 2024-01 (docs example referenced is 2024-07).
  • Query requests markets(first: 4) with id, name, and regions.

Current status:

  • Cause of the access denial is unclear; requester asks what is missing.
  • No resolution or guidance provided yet; the issue remains open with an unanswered key question about permissions or access context differences between Explorer and API.
Summarized with AI on December 28. AI used: gpt-5.

We have a shopify plus store in the EU that we are servicing multiple marketplaces for. We have made sure that the “read_markets / write_markets” scopes are enabled for this key we are using.

We are getting a consistent access denied, and I’m using a modified but similar CURL query from the graphql located at:

https://shopify.dev/docs/api/admin-graphql/2024-07/queries/markets?language=cURL

curl -X POST \
${store}/admin/api/2024-01/graphql.json \
-H 'Content-Type: application/json' \
-H "X-Shopify-Access-Token: ${access_token}" \
-d '{ "query": "query Markets { markets(first: 4) { nodes { id name regions(first: 2) { pageInfo { hasNextPage } nodes { name ... on MarketRegionCountry { code } } } } } }" }'
  • Yes, am a using the correct access_token - quadruple checked.
  • Yes, I am sure we applied the read/write scopes to aforementioned key.

Expecting a list like we get from graphql explorer using the same query but getting an Access denied for markets field.

What are we missing?