const shopify = shopifyApp({
api: {
apiVersion: LATEST_API_VERSION,
restResources,
billing: undefined, // or replace with billingConfig above to enable example billing
},
auth: {
path: "/api/auth?shop=brandgoclothe-01.myshopify.com",
callbackPath: "/api/auth/callback",
},
webhooks: {
path: "/api/webhooks",
},
// This should be replaced with your preferred storage strategy
sessionStorage: new SQLiteSessionStorage(DB_PATH),
});
when the api is called I am getting 503 error
I am attaching the RQ/RS of the api's
aditional informtion is earlier I am getting shop undefined error, so I have included shop=brandgoclothe-01.myshopify.com", as query parameter in and now I am getting 503 error in both the api's.
Thank you for the issue, but this repository isn't a support channel. Please use one of the official support channels. See https://shopify.dev/ for more info
In my index.js app.get("/api/abandoned-cart", async (_req, res) => { const checkoutsData = await shopify.api.rest.AbandonedCheckout.checkouts({ session: res.locals.shopify.session,
}); res.status(200).send(checkoutsData); });
and I have created a component abandonedCart
import React, { useEffect, useState } from "react";
function AbandonedCart() { const [checkoutsData, setCheckoutsData] = useState([]);
useEffect(() => { fetch("/api/abandoned-cart") .then(response => response.json()) .then(data => { setCheckoutsData(data) console.log("data",data)}) .catch(error => console.error(error)); }, []);
return (
Abandoned Cart Data:
); }
export default AbandonedCart;
the auth api I am calling is
const shopify = shopifyApp({ api: { apiVersion: LATEST_API_VERSION, restResources, billing: undefined, // or replace with billingConfig above to enable example billing }, auth: { path: "/api/auth?shop=brandgoclothe-01.myshopify.com", callbackPath: "/api/auth/callback", }, webhooks: { path: "/api/webhooks", }, // This should be replaced with your preferred storage strategy sessionStorage: new SQLiteSessionStorage(DB_PATH), });
when the api is called I am getting 503 error
I am attaching the RQ/RS of the api's
aditional informtion is earlier I am getting shop undefined error, so I have included shop=brandgoclothe-01.myshopify.com", as query parameter in and now I am getting 503 error in both the api's.
help me to get out of this