I have updated the scope in my public app configuration to read fulfillments. After deploying changes, existing installed application didn’t have updated scope permission.
What’s the right way to update permission of an existing installed apps without going through the reinstallation process.
Hey @Mohammad_Hanzala,
If you’re setting the [access_scopes]
in the TOML configuration file for the app and deploy it, users will be prompted to accept the new permissions the next time they open up the app. If you background jobs running in the app this could lead to a situation where API calls failed because the user hasn’t logged in and updated the permissions yet.
One thing that might help is appInstallation GraphQL query which will give you the current access scopes of the shop/app.
Best,
Daniel
Thanks for the reply @Daniel_Ablestar
My project is based on Ruby on Rails, and I am using shopify_app gem, which provides shopify_app.rb as configuration file.
If I add TOML file in the home directory of my project, then I need to update the permission in both the files. Is this the right approach?
Ah, I’m not too familiar with Ruby and the shopify_app gem. The TOML method I was talking about is if you’re using managed installations.
If you’re doing the OAuth redirects to get the permissions when someone installs the app, I think you’ll need to send the users who open the app to that OAuth URL so that they can accept the new permissions, otherwise they’ll still be on the old set. (But I’m not sure if the shopify_app gem a way to handle this)
Yeah, I am using the OAuth redirects to get the permissions when someone installs the app.
Merchants can accept the new scopes by using the same OAuth URL - but they shouldn’t need to uninstall the app.