Hi,
I have a working request setup to retrieve an auth bearer token in Postman.
When I generate the code as I usually would to use in my app, I am getting the following error:
"localhost/1234 Access to XMLHttpRequest at 'https://iad1.qualtrics.com/oauth2/token' from origin 'http://localhost:1234' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute."
I have also tried using fetch and am getting the same error.
I can retrieve the token using curl on the command line, so I am thinking the Qualtrics API doesn't support preflight requests?
Any assistance greatly appreciated as a bit time sensitive.
Thanks in advance!
Page 1 / 1
Update: as I'm working on an older stack, I have been able to retrieve the token using PHP/curl then pass it into react via props on the root component. It did not seem possible to fetch the bearer token using js.
I.e
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.