hayat_sama
9 years agoGuide
Cross Origin Request to API
I am doing R & D, in which I need help regarding call api from another domain using JAVASCRIPT.
For Example, I am calling given api for credentials,
But in order to call this, request should be raised from same domain, means from community domain only. But I want to access it from another domain for displaying community blog to our website.
Error : XMLHttpRequest cannot load https://community-name//restapi/vc/authentication/sessions/login?user.login=APIUserName&restapi.response_format=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'abc_domain' is therefore not allowed access.
Is it feasible to use api from another domains ?