401 Unauthorized: "{"code":124,"message":"Invalid access token."}"

API Endpoint(s) and/or Zoom API Event(s)
Zoom Api Url:
https://api.zoom.us/v2/users/<my_user_id>/meetings

Oauth Api Url :
https://zoom.us/oauth/token?grant_type=account_credentials&account_id=<my_account_id>

Description
I am using zoom api to create zoom meeting. And for the authorization I am using Bearer Token.

I am using Server-to-Server OAuth App api to fetch the bearer token. The api works fine. But I found that after some time (not know exactly when) the create meeting api started getting failed with error as: “{“code”:124,“message”:“Invalid access token.”}”.

Whenever my token expires, I am fetching the new token. But same problem occurring with new token also. That is initially I am able to create meeting but after sometimes I started getting Token Invalid error.

Error?
“{“code”:124,“message”:“Invalid access token.”}”

Below is the screenshot of my application logs. Showing when I have created new token and when started getting error.

Hi @aayush.jain ,

Server to Server tokens expire after 1 hour, so you’ll need to request a new one each time. Is the token expiring before the hour?

Let us know!

Yes, I am aware of 1 hour expiry. But I observed that I started getting issue after around 30 min of creation time.( Which means there are at least 30min remaining for the expiry).
Also, In case of expiry we gets “{“code”: 124,“message”: “Access token is expired.”}” error message.
So, I guess token expiry is not the case.
I also tried the same via postman app. There also I am getting same error after around 30min.

@aayush.jain

When you see the error, are you requesting a specific endpoint or do they all fail when they were previously working?

I am using only two api’s one for creating meeting and one for deleting meeting.

  1. https://api.zoom.us/v2/users/<my_user_id>/meetings
  2. https://api.zoom.us/v2//meetings/

Both the api’s are failing . In some cases I found that the calls failed after 20min also, with the same error message.