Hi everyone,
I’m currently developing an app using Shopify’s API and facing an issue when attempting to generate discount codes via OAuth. Here’s the setup and error I’m encountering:
Background
- App Setup: I created the app directly through the Shopify Partner Dashboard, under Apps, and selected a development store for testing.
- App Installation: Installed the app on the dev store and successfully obtained the API Key and API Secret.
- OAuth Setup: I’m following Shopify’s OAuth process to request an access token with the
write_discount_codes
scope so I can create price rules and discount codes.
Issue
When I initiate the OAuth flow, I receive this error:
OAuth error invalid_scope: The access scope is invalid: write_discount_codes
Details
- Store Plan: I’m using a development store, not a Shopify Plus or paid version.
- Scope Configuration: I couldn’t find any options to configure the scopes directly in the Partner Dashboard for my app.
- OAuth Scopes in Request: The request URL includes the
write_discount_codes
scope, which I believe is needed for managing discounts.
Questions
- Is the
write_discount_codes
scope available only on Shopify Plus or paid stores? - How can I configure or verify the scopes for a Partner Dashboard-created app?
- Any recommendations on how to test discount code generation functionality in a development store setup?
Any guidance on resolving this would be greatly appreciated! Thank you!