Hello, I am trying to fetch all articles and I keep getting CORS error no matter what I try. I tried to set the headers as mentioned here https://developers.intercom.com/docs/references/rest-api/api.intercom.io/Articles/listArticles/, adding also access allow control origin header but I can’t get the data. I get it in postman with no issue. What am I missing? Working with RTK Query.
Hi
Our system blocks calls to the REST API from browsers any browser that uses CORS and web apps that attempt to make client-side calls (as RTK Query is designed to do). This has been implemented our Product and Security teams to prevent important and sensitive data from being exposed.
In this type of scenario, you would need to make the request on the server-side, then populate that on the client-side directly from your server (assuming that's an option for you)
The client-side functions we have available are listed in our Javascript library, where the risk of exposing any customer-related data is minimized. Note, you can show a specific article using this JS snippet.
Let me know if that answers your question!
Reply
Join the Intercom Community 🎉
Already have an account? Login
Login to the community
No account yet? Create an account
Intercom Customers and Employees
Log in with SSOEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.