"The next page token is invalid or expired." when call get list of past sessions

API Endpoint(s) and/or Zoom API Event(s)
/videosdk/sessions

Description
I use the “/videosdk/sessions” endpoint to get a list of past sessions. However, when querying with next_page_token I get the error:

 {
      code: 300,
      message: 'The next page token is invalid or expired.'
 }

But I can’t reproduce that error.

With input get error: /v2/videosdk/sessions?type=past&from=2025-03-15&to=2025-03-15&next_page_token=FA7XWhepeLy2kC7XRLI3iL1putZ8nvequq239, please check for me what is wrong with this next_page_token

Thanks,
Phuong

Hi,
Sometime passing a “to” time in the future can cause an “invalid next page token error.”
Could you try adjusting the “to” parameter and see if it helps

Cheers,
Harsh
Fario Consulting

@Fario_Consulting Thanks for your feedback!

I also tried searching for articles with related errors and got the same answer as you.

However, the time I query is around 2025-03-16T00:06:00.000Z. With the input being from=2025-03-15&to=2025-03-15 I don’t think that is a time in the future.

Thanks,
Phuong

Hey @phuongnv1
Make sure that the next_page_token is not expired.
This token’s expiration period is 15 minutes

Hey @elisa.zoom,
The next_page_token should not be expired, as only about 2 minutes elapsed between starting the function and encountering the error.
Please check the logs for details. Token: FA7XWhepeLy2kC7XRLI3iL1putZ8nvequq239.

Thanks,
Phuong

Thanks for clarifying that.
I created a support ticket on your behalf. You will receive a follow up email soon

@elisa.zoom ,
Thank you for your support!

I’ve received your email and response. Based on the explanation provided, I was able to reproduce the error.

I’d like to quote the provided response so others facing the same issue can understand the cause and solution.

It seems the next_page_token is being invalidated in cases where another API call was made to the same endpoint, but the next_page_token was not used. I don’t see this limitation documented and it is not a standard design used in our other APIs, so I will be treating this as a bug on our end.

In the meantime, a valid workaround would be to ensure to use any next_page_token’s retrieved in the next request to the same endpoint, otherwise they will be invalidated and pagination will need to be restarted for the set of calls.

This appears to be a limitation of the API, and I hope to receive support in the future.

Thanks,
Phuong

1 Like

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