Server to Server Oauth

Hello

I have developed an app which is accessing meeting status within a loop.
most of the time it works but sometimes I receive an error. 401 "Invalid access token."

The process last a few minutes so I don’t reach the hour limit

Why is it occurring ?
How can I check the validity of a recently generated token or avoid the problem ?

Thanks

Hi @EVant
The access_token generated with the Server to Server Oauth app has an expiration time of 1 hour and once you generate a new token, the previous one gets invalidated.
It seems strange to me that you are getting this error if you are creating new tokens within minutes

This happened 3 times.
Each times and within a few minutes after the token generation and after several api calls

@EVant
Interesting.
Do you happen to have the API calls you made (endpoints) and the date and time when this issue happened?

Although the problem usually occurs in loop processing, this time there was only one call.

2023-02-16 13:00:02,913 /meetings/89525337799/status
In this case, I generated the token, called the API, and received a 401 error message that was caught. I immediately requested another token and it worked

here is an other example.
end point: https://api.zoom.us/v2/users/*user*/meetings
In a loop
Start at 2023-02-17 14:49:24,256
97 success API calls
2023-02-17 14:50:02,006 **ERROR**
update header
300 success API calls
2023-02-17 14:54:01,941 **ERROR**
update header
305 success API calls

Hi @EVant
I am really sorry for the late reply
I will send you a private message to follow up

This behavior is similar to another developer. Linking the ticket here for reference: