# Invalid access token when calling API endpoint /v2/webinars/{id}/registrants

**URL:** <https://devforum.zoom.us/t/invalid-access-token-when-calling-api-endpoint-v2-webinars-id-registrants/55432>\
**Category:** API and Webhooks\
**Created:** [August 9, 2021, 4:48am UTC](https://devforum.zoom.us/t/invalid-access-token-when-calling-api-endpoint-v2-webinars-id-registrants/55432 "2021-08-09T04:48:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rupak](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rupak/32/29918_2.png) [@rupak](https://devforum.zoom.us/u/rupak)\
**Post date:** [August 9, 2021, 4:48am UTC](https://devforum.zoom.us/t/invalid-access-token-when-calling-api-endpoint-v2-webinars-id-registrants/55432/1 "2021-08-09T04:48:21Z")

</div>

## Using this template helps us debug your issues more effectively 🙂

**Description**  
A clear and concise description of what the question is.  
I am trying to register a user to a webinar using the API call /v2/webinars/{id}/registrants but getting Invalid access token

**Error**  
The full error message or issue you are running into.

[code] =\> 124  
[message] =\> Invalid access token.

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
Knowing the endpoint/s can help us to identify your issue faster. Please link the ones you need help/have a question with.  
[api.zoom.us/v2/webinars/{id}/registrants](http://api.zoom.us/v2/webinars/%7Bid%7D/registrants)

**Which Endpoint/s?**  
Knowing the API endpoint/s can help us to identify your issue faster. Please link the ones you need help/have a question with.  
[api.zoom.us/v2/webinars/{id}/registrants](http://api.zoom.us/v2/webinars/%7Bid%7D/registrants)

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:

1. Request URL / Headers (without credentials) / Body
2. See error

**Screenshots (If applicable)**  
If applicable, add screenshots to help explain your problem.

**Additional context**  
Add any other context about the problem here.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [August 10, 2021, 1:14am UTC](https://devforum.zoom.us/t/invalid-access-token-when-calling-api-endpoint-v2-webinars-id-registrants/55432/2 "2021-08-10T01:14:11Z")

</div>

Hey @rupak,

Plese make sure that you are following the relevant steps in our [JWT App](https://marketplace.zoom.us/docs/guides/auth/jwt) or [OAuth App](https://marketplace.zoom.us/docs/guides/auth/oauth) documentation depending on what you are using.

If that doesn’t help, please send an email to [developersupport@zoom.us](mailto:developersupport@zoom.us) with a link to this thread. In that email, please provide the token that you used as well as the full request that was made.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![rupak](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rupak/32/29918_2.png) [@rupak](https://devforum.zoom.us/u/rupak)\
**Post date:** [August 10, 2021, 10:58am UTC](https://devforum.zoom.us/t/invalid-access-token-when-calling-api-endpoint-v2-webinars-id-registrants/55432/3 "2021-08-10T10:58:09Z")

</div>

Hello Max,  
I was using the PHP wrapper [GitHub - espresso-dev/zoom-php: A simple PHP class for accessing the Zoom API](https://github.com/espresso-dev/zoom-php) and i had to make changes to it to call the API correctly. Now i am getting proper response.

Please let me know how long the access token remains valid.  
In our system we have to call the zoom API anyday multiple times and we want it to be authorized only once, thereafter we only want to use the access/refresh token to complete the API calls. Please suggest how we proceed.

Best Regards,  
Rupak

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [August 11, 2021, 5:17pm UTC](https://devforum.zoom.us/t/invalid-access-token-when-calling-api-endpoint-v2-webinars-id-registrants/55432/4 "2021-08-11T17:17:30Z")

</div>

Hey @rupak,

Awesome! I’m glad that you were able to resolve your issue.

If you’re using an OAuth app, you’ll want to check if the Access Token is expired before making your request. An Access Token is valid for. A token is valid for one hour so if it has been longer than one hour you’ll want to use the Refresh Token to request a new Access Token before making your request.

A Refresh Token is valid for 15 years. Once you make a request with an invalid Access Token you’ll need to reauthorize the app.

Let me know if that helps.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [September 11, 2021, 3:17am UTC](https://devforum.zoom.us/t/invalid-access-token-when-calling-api-endpoint-v2-webinars-id-registrants/55432/5 "2021-09-11T03:17:33Z")

</div>

Closed on September 11, 2021, 3:17am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
