ruby - How to view the X-Shopify-Shop-Api-Call-Limit
I just did this in my terminal and it worked a peach...
shop = Shop.first session = ShopifyAPI::Auth::Session.new( shop: shop.shopify_domain, access_token: shop.shopify_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get(path: "products") p response.headers["x-shopify-shop-api-call-limit"] ["1/40"] => ["1/40"]
So it is not too terribly hard to access the response headers. I see you're getting the response of the API call and not the HTTP response itself, so it seems you need to approach it differently for those old API calls. Maybe try updating to the more modern API and see if that helps you out.
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
774 @shopify/shopify-api nodejs - Set permanent access token for private app installed on only one store
790 why does the login and password popup appear when you search for ajax using the api admin in shopify
977 Solving the Mystery: How to fix "This action requires merchant approval for read_checkouts scope" Error on Shopify REST Admin API GET Request
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.