I think when you hit an external API from a Shopify theme, you need to set up CORS on the API to allow the request. Where can I find the IP address of the store? The API I'm talking about here is not the Shopify API, but an external API.
Why would you be accessing the Admin API from the theme? That would not be secure at all. The data communication should go via an app that can authenticate securely, and it's that app that you would make your calls to.
What calls are you making?
I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.
Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.
Thanks for the reply. The APIs we are talking about here are not management APIs, but third party APIs. For example, facebookAPI. If i access such an API from a theme (liquid), i will get a CORS error. But the API is public, and i can get the response directly from the browser with get.