0

I have built Shopify public app with Read Orders Scope only, Now i just realized that i will have to also add a new asset to my installers store.

I can't add the new 'write_theme' scope to my Auth request because i am getting an error from Shopify saying that the scope is invalid. (probably i will have to force my users to uninstall the app and then install it again with the new scope Auth request...

Is there a way to add new scope for an existing app installers stores? Maybe to send my app users to a new Installation Confirmation at Shopify to grant the new permissions ?

Dayan Roee
  • 61
  • 1
  • 8

2 Answers2

2

OK i just solved this issue,

All you need in order to grant new permissions to your existing users is to delete the AuthToken stored in your database as call the authenticate with the AuthToken = '', It will take the user to grant access again for the new permissions.

Dayan Roee
  • 61
  • 1
  • 8
  • I ran into a similar issue once. Which I handled by redirecting the user using top most window reference in javascript to the permission url. echo(""); But I am trying to understand your solution, as it seems simple. My oauth process includes using the code again and again to exchange for an access token. So i dont really use oauth from my database. Which I do realise while typing is not correct. – Aman Dec 27 '17 at 19:20
  • @Aman - is your `$permission_url` something locally on your side, or the shopify side URL? If Shopify - how does it look? – Janusz 'Ivellios' Kamieński Jun 12 '18 at 07:03
  • 1
    @Janusz'Ivellios'Kamieński Its a Shopify admin API endpoint. https://{shop}.myshopify.com/admin/oauth/authorize?client_id={api_key}&scope={scopes}&redirect_uri={redirect_uri}&state={nonce}&grant_options[]={option} Reference: https://help.shopify.com/api/getting-started/authentication/oauth – Aman Jun 12 '18 at 07:49
-1

Sound be a simple fix - the permission for writing themes is write_themes (pluralized).

Cheers!

  • As i wrote above i have tried that but If i am adding a new Scope to my App code i am getting an Error 'scope is invalid'. This is because the user is trying to login with AuthToken that is not suppose to ask for the write_themes Permissions Scope. So what i am asking is how can i force my Users to be redirected to the 'Install' screen AGAIN for granting the new Permissions... – Dayan Roee Mar 12 '13 at 12:25