A space to discuss online store customization, theme development, and Liquid templating.
I'm trying to call Shopify's product recommendation API from the checkout extension but am getting cors errors. The script seems to be hosted on cdn.shopify.com, but despite enabling network_access in both the extension and partner dashboard this does not seem possible. I cannot call my own app proxy either.
How do you call the product recommendation API from the checkout extension? I also made a Github issue here:
hey...if you solved this issue...can you please help here!
If you are trying to access the Shopify Storefront API and your store is password-protected (such as a development store), you may encounter authentication issues.
To resolve this issue, you can add "credentials: 'include'" to your fetch call. This will include any credentials, such as cookies or authorization headers, in the request. With this, you will be able to authenticate the request and access the Storefront API even if the store is password-protected.
However, this does not solve the issue in the case of App Proxy. We faced the same issue, but we were able to figure out why we received a CORS error for the Storefront API.
I hope this helps.