Unable to get shop details using shopify-api-node

New Member
1 0 0

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?


Replies 3 (3)
Shopify Staff
Shopify Staff
1098 146 219

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

New Member
6 0 0

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?



New Member
1 0 0

pls set your local time .