Error while requesting access token
# 🤝help
p
Getting cross origin error while requesting an access token from the chatbot, but it's working fine in the local system and also in the postman. The error specified to add the botpress studio cloud url in spa of azure portal, but even after trying that i am getting the same issue. It would be great if someone could help me with this issue.
a
Some APIs don't accept requests from frontend applications (like BP cloud) for security reasons. For example, it'd be really easy for someone to open their browser console and steal your API keys. These APIs will often throw a CORS error unless you access them from a backend service. There's not an easy way around this. Best case, you can try setting up a small node.js server with an endpoint that the bot can call for your server to make the request. There are also ways to possibly proxy the request but I'm not experienced with that.
128 Views