shopify when I created a custom app and I wanted to get cart data from a third-party website my store is “https://store.myshopify.com/cart.json” Cart data using API and node js then shows the error unable to access myshopify.com I will share my node code. now I am want to get the cart item in node js.
const request = require('request');
const express = require('express');
const cors = require('cors');
const app = express();
app.use(cors());
let apikey = '0520e894b0d93f2af3be7a07f3ef8yec';
let pass = 'shpat_d59f83a39d031d34ecbea8dqqq6f12ac';
let endpoint = 'cart';
let options = {
'method': 'GET',
'url' : `https://store.myshopify.com/${endpoint}.json`,
'headers': {
'Content-Type':'application/json',
'Allow': "GET",
}
};
app.get("/", (req, reps)=>{
request(options,function(error, response){
if(error) throw new Error(error);
reps.send(response.body);
console.log(response);
});
});
app.listen(3900);
when I run code localhost:3900 in the browser there is an error. so I will share a screenshot below.
please give me any solutions.