Hello,
i sell on a marketplace and want to fetch the orders from an XML link they provided and create orders in Shopify via API automatically. I have set up a cloudflare worker with a cron job. I created also a custom app to get an admin api key. I have read_products and write_orders scope
Problem is that a get a 403 Code when doing the GraphQl query through code. When using Postman, everything is fine with the response and so on.
I have read that 403 means Store is fraudulent.. 403 is what i get from graphRes.status, see below.
Anyone knows what i can do?
Here is my example code:
let query;
query = \`{ productVariants(first: 1, query: "barcode:123456789545") { edges { node { id } } } }\`;
let graphRes;
try {
graphRes = await fetch(
\`https://${env.SHOPIFY_SHOP_DOMAIN}/admin/api/2026-04/graphql.json\`,
{
method: "POST",
headers: {
"X-Shopify-Access-Token": env.SHOPIFY_ACCESS_TOKEN,
"Content-Type": "application/json",
},
body: JSON.stringify({ query }),
},
);
console.log("Fetch succesfull, Status:", graphRes.status);
} catch (e) {
console.log("Fetch crashed: ", e.message);
return; // Stop, damit wir sehen, was passiert ist
}