# Access to REST API

**URL:** <https://devforum.zoom.us/t/access-to-rest-api/3180>\
**Category:** API and Webhooks\
**Created:** [February 3, 2019, 3:36pm UTC](https://devforum.zoom.us/t/access-to-rest-api/3180 "2019-02-03T15:36:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![p.abdulghani](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@p.abdulghani](https://devforum.zoom.us/u/p.abdulghani)\
**Post date:** [February 3, 2019, 3:36pm UTC](https://devforum.zoom.us/t/access-to-rest-api/3180/1 "2019-02-03T15:36:56Z")

</div>

Hi Guys,

I am trying to access zoom REST API (Get /users/{userId}/meetings) from my localhost application. But it 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. What is the root cause for this issue? Please support to resolve it.

Thanks

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [February 4, 2019, 5:20pm UTC](https://devforum.zoom.us/t/access-to-rest-api/3180/2 "2019-02-04T17:20:15Z")

</div>

Hi @p.abdulghani,

Can you share the payload that you’re sending?

---

<div class="post-metadata">

**Author:** ![p.abdulghani](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@p.abdulghani](https://devforum.zoom.us/u/p.abdulghani)\
**Post date:** [February 20, 2019, 2:16pm UTC](https://devforum.zoom.us/t/access-to-rest-api/3180/3 "2019-02-20T14:16:12Z")

</div>

Hi Michael,

I am accessing REST API in java web application as follows. Access token getting expired after some mins. I need to get access token often from zoom site. Instead of it, is there any method (implemented in Java) to get access token for each request?

```auto
HttpResponse<String> response = Unirest.get("https://api.zoom.us/v2/users/{userId}/meetings?page_size=30&page_number=1")
  .header("authorization", "Bearer eyJhbGciOiJIUzUxMiJ9.eyJhdWQiOiJodHRwczovL29hdXRoLnpvb20udXMiLCJhY2NvdW50SWQiOiIteTBxYUJmRlRUNmtEYVh2cE1qaHdBIiwidmVyIjoiMy4wIiwibmJmIjoxNTUwNjMxNjQ5LCJjbGllbnRJZCI6IkZENWk4MGFjUldkSkZxMTJTV2xJZyIsImlzcyI6InVybjp6b29tOmNvbm5lY3Q6Y2xpZW50aWQ6RkQ1aTgwYWNSV2RKRnExMlNXbElnIiwiZW52IjpbbnVsbF0sImV4cCI6MTU1MDYzNTI0OSwidG9rZW5UeXBlIjoiYWNjZXNzX3Rva2VuIiwiaWF0IjoxNTUwNjMxNjQ5LCJ1c2VySWQiOiJhMVRrUDB2dlFyZTNsZ1Y0S3hMQ0tBIiwianRpIjoiYWU4ZmY1YzktODI0YS00MjI3LWI5NjctYzRlNmU5NTE3OTk4In0._SqGJQTNe2kk4pyipRWMPwr_Mku1LXwH8U6NEvhrAOMc0DjaezXXFOBcvxjM76hdEZ3a4zYPyC-9Vm2crmHVSQ")
  .asString();

```

Thanks  
Abdulghani

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [February 20, 2019, 10:51pm UTC](https://devforum.zoom.us/t/access-to-rest-api/3180/4 "2019-02-20T22:51:14Z")

</div>

Hi @p.abdulghani

To get the access token after it expires, you will need use the refresh token[0].

0 - [https://marketplace.zoom.us/docs/guides/authorization/oauth-with-zoom#refresh-access-token](https://marketplace.zoom.us/docs/guides/authorization/oauth-with-zoom#refresh-access-token).

Thanks

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 6:10pm UTC](https://devforum.zoom.us/t/access-to-rest-api/3180/5 "2020-08-21T18:10:24Z")

</div>

Closed on August 21, 2020, 6:10pm UTC


