Forum Discussion
jaikumar1
7 years agoMentor
Hi VikasB,
Thank you for your response. I have tried the V2 API, and the following method to request the data from the server.
https://<community-server>/api/2.0/search?q=?q=select * from messages where board.id = "1" and subject MATCHES "Fast track" and post_time > 2013-10-07T10:04:30-08:00 AND post_time < 2018-04-17T10:04:30-08:00
The above url will request in ajax, from other server. While performing the ajax request, i'm getting the following "Access-Control-Allow-Origin" error.
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 401.
I referred in the document, and we may need to send client-id while initiate the request. If this is true, please help me how to achieve to resolve the issue.
VikasB
7 years agoBoss
Below links can resolve your problem.
https://community.lithium.com/t5/Developer-Discussion/Access-Control-Issue/m-p/251474#M10650
https://community.lithium.com/t5/Other-Techie-Stuff/CORS-vs-JSONP/ta-p/213715