App reviews, troubleshooting, and recommendations
Hello,
I am a 3rd party app developer using Shopify's shopify_api ruby gem to develop an app. I'm running into an issue where anytime I try to make an API request for a client I am running into a 301 redirect. For example, say I wanted to return all products belonging to a shop named "shopA".
ShopifyAPI::Product.find(:all, params: { limit: API_ROW_LIMIT })
The API returns:
Failed. Response code = 301. Response message = Moved Permanently. => https://shopB.myshopify.com/admin/api/2023-04/products.json?limit=250
If I try navigating to shopB.myshopify.com in my browser it redirects to the correct site, shopA.myshopify.com. I'm not sure where the shopB redirect is coming from. It's possible the client shop was originally named shopB but i was not able to confirm that.
Does anyone have any suggestions on how I can get around this? The shopify_api gem version I'm using is shopify_api (~> 9.4, >= 9.4.1)
Look at the Location: value in the response headers. That's the URL you should be using and you'll no longer get the redirects.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024