Hi All
I have a React application which uses the Axios library to GET data from the Talend API. My request works in Postman but when I run it from React I get
Access to XMLHttpRequest at 'https://api.us.cloud.talend.com/v1/management/roles/[role id]/users' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
xhr.js:177 GET https://api.us.cloud.talend.com/v1/management/roles/[role id]/users net::ERR_FAILED
Has anyone been able to get API calls working from a browser application? My headers are (with the apostrophes removed)
Access-Control-Allow-Origin:http://localhost:3000,
Content-Type: application/json,
Authorization:Bearer [auth token]
I also tried
Access-Control-Allow-Origin: *
Content-Type: application/json,
Authorization:Bearer [auth token]
Thanks!