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.

Can I fetch data from the ADMIN Rest API in my Pos extension?

Solved

Can I fetch data from the ADMIN Rest API in my Pos extension?

NorthSouthAI
Shopify Partner
3 1 0

I am currently working developing a PoS extension, and in this PoS extension I want to fetch the data from the Admin REST API of orders, but when I try to retrieve the data from my server, it returns me the next CORS error: 

 

Access to fetch at 'https://ed1b-200-8-39-113.ngrok-free.app/api/saludar' from origin 'https://cdn.shopify.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

This is an image of the code: 

NorthSouthAI_0-1721408186250.png

 




Accepted Solution (1)

NorthSouthAI
Shopify Partner
3 1 0

This is an accepted solution.

I already solved it! We needed to add a Cloudflare Quick Tunnel

View solution in original post

Reply 1 (1)

NorthSouthAI
Shopify Partner
3 1 0

This is an accepted solution.

I already solved it! We needed to add a Cloudflare Quick Tunnel