Private app CORS error

New Member
4 0 0

I am working on fetching order data by using private app key and private app password in live shopify store. I am calling the particular api url using ajax , but it gives me CORS error. When i hit the same url in the browser then it works fine. Then why it does not work in my code and gives me CORS error. 

Please suggest me why this happening and how can i fix it

0 Likes
Highlighted
Community Manager
Community Manager
451 17 45

Hi @john12345,

 

Is there a reason you're trying to make this call using AJAX on the storefront? It's going to be insecure exposing your credentials like that. I'd highly recommend making any calls from a server side app, or using an app proxy for any calls you want to make from the front-end. Check our documentation on app proxies here.

 

0 Likes