Everybody. i am come with a problem that answer i could not found google. so i asked.
problem is when i try to calling Zoom any API then i am greeting error CROS that is below. i used proxy server for this but not working .so i removed this from anguler.json.
Access to XMLHttpRequest at 'https://api.zoom.us/v2/users/La------77/meetings'
from origin 'http://localhost:4200' 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.
i am setting 'Access-Control-Allow-Origin:*' but not working. i configure proxy server but it was being redirect on Zoom site.
check my code
fetchAllMeetings(){
let header = new HttpHeaders({ "Authorization": "Bearer "+this.CLIENT_TOKEN,
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*' });
const requestOptions = { headers: header};
return this.httpClient.get('https://api.zoom.us/v2/users/LayQ----FTgmw/meetings',requestOptions).pipe(first(), catchError(this.handleError));
}
Response Error
API Call
I setup proxy server for this... but removed because i was redirect in zoom website.
src/proxy.conf.json
{
"*": {
"target": "https://api.zoom.us",
"secure": false,
"logLevel": "debug"
}
}
angular.json
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "Zoom-Meeting:build",
"proxyConfig": "src/proxy.conf.json"
},