App loses API access immediately when adding new scopes

Hi everyone,

I am running into an issue when upgrading the scopes of an app.

When we request additional scopes, the app seems to lose API access immediately, even before the merchant has accepted the new permissions. As a result, the app cannot keep working normally before the merchant accepts the new scope.

Has anyone found a good way to handle this?

Thanks!

Hi @Fabien_Sebban

This is a known pain point when updating the scopes field in your app’s TOML file. When you deploy new required scopes via shopify app deploy, Shopify puts the app into a state where the merchant needs to re-approve permissions, and until they do, API access can break.

The recommended way to handle this is to use optional scopes instead:

With optional_scopes, your app’s existing access stays completely intact, and you request the new permissions at runtime only when needed. The merchant sees an in-app modal to approve, and your app keeps working normally in the meantime.

1 Like

Thanks @Liam-Shopify for the recommendation. I’ll do that for the next permissions update.