Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

Can the app's access scopes act differently for different shops ? by Targeting Mantra

$
0
0

I got an app installed on one of my clients and the access auth were of following categories:

:scope => 'read_orders, read_products, write_themes, write_content, read_content, write_script_tags,',

One of the demo shops on which I was testing the same app has no issues with authentications. I can easily modify things and add css and liquids to my admin panel. On the actual clients end I got the auth token but I am not able to modify the liquids/add any thing there. I can read things as "themes", products but cannot modify anything. The scope remains as it is (same app used for demo and client's end)

    

    widgetsliquid = ShopifyAPI::Asset.new(:key => "snippets/widgetsliquid.liquid", :theme_id => "#{theme.id}")
    widgetsliquid.save  
    widgetsliquid.attach(File.read(File.join(Rails.root, 'lib/assets/shopify', 'widgetsliquid.liquid'))) 

Exception:

ActiveResource::UnauthorizedAccess: Failed.  Response code = 401.  Response message = Unauthorized.
    from /home/deploy/tm_shopify_app/production/shared/bundle/ruby/1.9.1/gems/activeresource-4.0.0/lib/active_resource/connection.rb:140:in `handle_response'

While the same thing returns true for my demo app. Is there any situation where this might happen? I am afraid I will have to ask for a reinstallation? Please help me out!!


Viewing all articles
Browse latest Browse all 25503

Trending Articles