Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

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

Morin0094
Tourist
8 0 1

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.

 

Replies 2 (2)

Morin0094
Tourist
8 0 1

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. 😞

Morin0094
Tourist
8 0 1

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

Thanks everybody!!!!!!!