Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No passed or active session (ShopifyAPI::Errors::NoActiveSessionError) #1224

Closed
sajjadmurtaza opened this issue Oct 5, 2023 · 2 comments
Closed

Comments

@sajjadmurtaza
Copy link

sajjadmurtaza commented Oct 5, 2023

Issue summary

I setup new project and added gem 'shopify_api', '~> 13.1.0'

Here is my initializers/shopify_api.rb

ShopifyAPI::Context.setup(
  api_key: ENV['SHOPIFY_API_KEY'],
  api_secret_key: ENV['SHOPIFY_SECRET_KEY'],
  host: ENV['SHOPIFY_SHOP_NAME'],
  scope: 'read_products,write_products,read_orders,write_orders',
  is_embedded: false,
  api_version: ENV['SHOPIFY_API_VERSION'],
  is_private: true
)

When i run on rails console(to make sure if i can call shopify object):

ShopifyAPI::Product.all
/Users/username/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/shopify_api-13.1.0/lib/shopify_api/clients/http_client.rb:14:in `initialize': No passed or active session (ShopifyAPI::Errors::NoActiveSessionError)

No passed or active session (ShopifyAPI::Errors::NoActiveSessionError)

  • shopify_api version:
  • Ruby version: 13.1.0
  • Operating system: mac
lib/shopify_api/clients/http_client.rb:14:in `initialize': No passed or active session (ShopifyAPI::Errors::NoActiveSessionError)```

## Expected behavior

Should connect and return the products 

## Actual behavior

returning error:  NoActiveSessionError

@ziaulrehman40
Copy link

What was the issue?

@glenjamin
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants