Unable to get shop details using shopify-api-node

ajayvardhan
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?

 

0 Likes
SBD_
Shopify Staff
Shopify Staff
1044 141 185

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?

0 Likes
jbk
New Member
3 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?

 

Thanks

0 Likes