CORS Policy - Deny my request

Good Evening,

I have a problem with my angular JS application. I´m developing a web application and I have a problem whe I try to call API REST. I have done several test with Oauth2, and I can´t get the token authorization…allway I get CORS policy deny.

Now I´m trying to send a simple list user request: https://api.zoom.us/v2/users?status=active&page_size=30&page_number=1

I´m using Authorization JWT Token generated from your marketplace.zoom.us:

  • Headers:
    .set(‘Authorization’, "Bearer " + jwt)
    .set(‘Content-Type’, ‘application/json’)
    .set(‘Access-Control-Request-Method’, ‘GET’)
    .set(‘Access-Control-Allow-Methods’, ‘GET, HEAD, POST, PUT, DELETE, OPTIONS, PATCH’)
    .set(‘Access-Control-Request-Headers’, ‘access-control-allow-methods,authorization,content-type’);

I´m getting this error: “Access to XMLHttpRequest at ‘https://api.zoom.us/v2/users?status=active&page_size=30&page_number=1’ from origin ‘https://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.”

If I install and enable Chrome Extension: Allow CORS: Access-Control-Allow-origin, I get this error “Access to XMLHttpRequest at ‘https://api.zoom.us/v2/users?status=active&page_size=30&page_number=1’ from origin ‘https://localhost:4200’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: It does not have HTTP ok status”.

I need to use API Rest from my development environment with AngularJS. I don´t know if any can help me with this problem, because I don´t know how can avoid this CORS Policy problem. How can I use the API from Angular JS Project?

Maybe the problem is with “Origin” localhost, but I have tried a public domain with a proxy inverse and always get CORS policy deny. :frowning:

Or maybe is that I can´t use API from Client Server…just from APP Server ¿?

Thanks so much.
Best Regards.

Hi David,

Our REST API can only be used via server side and not client side, hence the errors that you are receiving.

Thanks

Ok. Thanks so much!
Best regars.