I connect my domain and my Rest API call dosen't work

Morin0094
New Member
3 0 0

Hi!

I just published my very first Shopify website!

But, my Rest API calls are not working anymore because of the cors policies.

Access to XMLHttpRequest at 'https://xxxxxx.myshopify.com/admin/api/2021-01/products.json?limit=250&product_type=Laines&status=ac...' (redirected from 'https://xxxxxx/admin/api/2021-01/products.json?limit=250&product_type=Laines&status=active') from origin 'xxxxxx' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Is there an easy fix to this, like whitelisting my domain somewhere somehow?

I've spend 2 hours reading stuff and I didn't find a solution.

 

Thank you in advance for saving my day.

 

0 Likes
Morin0094
New Member
3 0 0

Ok so I read somewhere that I need to create an app proxy and this will be able to call the admin api.

But nowhere I found how to acheive that.

0 Likes
Morin0094
New Member
3 0 0

Ok I made a webservice who call the private app. Everything works!

Thanks everybody!!!!!!!

0 Likes