urlRedirects Query Broken Since 2022

Today I found out that even if an access token has read_content/write_content scopes, the urlRedirects query returns with an error stating: Access denied for urlRedirects field.

This was reported on GitHub around 2 years ago: https://github.com/Shopify/shopify-app-template-node/issues/845. There’s a pretty good explanation of the issue.

I thought that we should move the conversation here. Is there any solution besides using REST?

Hi @guest4 ,

When we test the urlRedirects query in the GraphQL Admin API right now in versions 2023-07 and 2024-04 it’s working well if the required read_online_store_navigation scope is granted to the app making the query.

This scope is mentioned as the one that’s required at the top of the dev docs for the UrlRedirect GraphQL object:

https://shopify.dev/docs/api/admin-graphql/2023-07/objects/UrlRedirect

The read_content scope still works for the REST Admin API Redirect endpoint which matches those docs:

https://shopify.dev/docs/api/admin-rest/2023-07/resources/redirect

I seem to have overlooked that permission. Thanks for checking and following up.