We tried using invokeTemplate
in Freshsales to call an API, but since our payload is large, the Freshsales support team suggested using Axios. However, when we use Axios, we encounter a CORS error.
Hi @Vrushali_Ambre,
You can find the reason for CORS errors from the Marketplace apps in this article.
You can also find the URL from which the apps are hosted. If you own the API service, you can add it to the headers to avoid this error. If it’s a third-party API, there’s no other way to avoid it.
In this case, the workaround would be to use your custom API middleware to handle this request, bypass the CORS issue, and return the response.