You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

CORS Preflight error while trying to use Oracle Chat REST API

Accepted answer
20
Views
7
Comments
edited Feb 11, 2020 9:11PM in Integrations and APIs 7 comments

Content

I am trying to make an ajax call to the requestEngagement endpoint using the Chat REST API. However, I am seeing the following error :-

 

Access to XMLHttpRequest at 'https://****.rightnowtech.com/engagement/api/consumer/<site_name>/v1/requestEngagement?pool=<pool>'; from origin 'https://www.mywebsite.com'; has been blocked by CORS policy: Request header field osvc-crest-application-context is not allowed by Access-Control-Allow-Headers in preflight response.

If I remove the osvc-crest-application-context from the headers, I am getting a 400 Bad Request error message. From the preflight response from the server, I can see that only following headers are expected by the server.

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!