Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
I use the shopify-api-node library like this -
const shopifyapi = new Shopify({ shopName: store.name, autoLimit: true, apiVersion: '2020-01', accessToken: store.token, }); const shopifyShopData = await shopifyapi.shop.get();
But I I keep getting an error HTML response which is being converted to JSON by the library and the error I see from my side is
Unexpected token < in JSON at position 3 in "https://shopname.myshopify.com/admin/api/2020-01/shop.json"
Is this a problem with the library/API or am I doing something wrong here?
Hey @ajayvardhan,
Seems to be working OK on my end - are you using the latest version of the library? Any chance you can catch a request ID from the response headers?
Scott | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
I'm seeing the same thing. When I sent the request using the latest version of the node library, I get `Unexpected token < in JSON at position 3 in`.
Any way to troubleshoot this?
Thanks
pls set your local time .