1
votes

A continuation of this question really: How to use the Rails shopify_app gem with a private API key?

I have a Shopify App generated with the shopify_app gem, all working fine.

I want to 'convert' this to a private app with the primary aim of having offline access to run scheduled tasks.

Using the shopify_api gem via irb is all working fine and I can update orders etc that way, but initialising the shopify_api session for the private app is what I'm struggling with now.

  1. Is it best to re-install the app to gain the access token I need or can I access this some other way?
  2. Is it best to write another controller to handle the private app or can I make use of those provided with the shopify_app gem?

I've read the instructions below (and lots of other shopify documentation), so it's not a case of not looking, I just need a little extra guidance: http://wiki.shopify.com/Using_the_shopify_api_gem_with_the_credentials_of_a_private_application

Thanks!

1

1 Answers

1
votes

All you need to do is initialize the ShopifyAPI::Session with the password you were given. You're probably doing this in a before filter somewhere? Instead of initializing with the access_token use the password you have.