Intercom API, how to fix CORS error?

  • 18 January 2024
  • 2 replies

I'm trying to use the Api directly on the front end, but I'm getting this CORS error strict-origin-when-cross-origin.


httpOptions = {
headers: new HttpHeaders({
'Content-Type': 'application/json',
'Authorization': 'Bearer ....',
'Access-Control-Allow-Origin': '*'

doest not Intercom apis  work in the client side?


Best answer by Nick VZ 19 January 2024, 17:57

View original

2 replies

Hi Felipe -- using our REST API on the client-side isn't supported and represents a significant security risk as the bearer token used to authenticate requests would be exposed. A CORS error is expected in this situation. The REST API should be used from your server.

Ty @Nick VZ