My Api work on postman but the jQuery code of Api which I have got from postman not working

I hit my API in postman and it worked, but when I ran the postman jQuery code in our Shopify store in the JavaScript file, it gave me the error “CORS” here is the URL of my site please help https://kgw7gpwtvrl0b7yg-44673761431.shopifypreview.com regarding this

hi @dineshkumarc133

this is a standard :grinning_face_with_smiling_eyes:
Postman has its own cors policy in the useragent and cookies so it can avoid this kind of errors;
When calling the endpoint from a live environment you will need to configure the server in order to accept requests from the calling url,

here’s a nice article about this on stackoverflow