skip to Main Content

I’ve received the above error when following the guides from Shopify to create a Rails app. None of the other solutions worked and I followed the Shopify guide to the tee.

2

Answers


  1. Chosen as BEST ANSWER

    Downloading the Shopify Rails app from github, I saw that they had this in their shop model:

    def api_version
       ShopifyApp.configuration.api_version
    end
    

  2. Simply put, you made an API call without opening up a valid session. A session opens when you provide a shop domain, its API token, and the version of the API you expect to use.

    If you fail to open a session, and make a call, you get that message. So inspect your code, and ensure you have a session. The convenience method is used all over the place, first get a shop instance, then use the method with_shopify_session. Your problem will then go away. You can also hot-rod this for NON typical use cases, by making a similar method with_api_session that mimics the Shopify call, allowing you to function with your own codes, where perhaps you are not directly installed an App but still have API keys. Think private Apps.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search