Retrieving last page using next_token

Description
Dear Zoom Support,
I have developed a python code to retrieve meeting and related details using zoom API.

Error
When i try to get all meetings with different pages (page_size=300), i will end up getting more records.
For example, the returned json shows total record is 2245, that requires 2245/300 ~=8 API calls.
However, my last API call return 300 records instead of 145.
Please see **issue at the end

the problem is gone if returned records is less than 300 records.
Please see **normal cases at the end

You can see the separate call generated by the script and the number of returned len(return_json[‘meetings’]) at the end of this thread

Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT

Which Endpoint/s?
api.zoom.us/v2/metrics/meetings

Additional context

i have to remove all https part of the request

Requests and the returned count
**issue:
api.zoom.us/v2/metrics/meetings?page_size=300&type=past&from=2020-04-21&to=2020-04-30
300
api.zoom.us/v2/metrics/meetings?page_size=300&type=past&from=2020-04-21&to=2020-04-30&next_page_token=0tNep5XV1dqeTvRgMlQtsb527wNiVgJLtE2
300
api.zoom.us/v2/metrics/meetings?page_size=300&type=past&from=2020-04-21&to=2020-04-30&next_page_token=SWcUAf9d9GeOZZYdrlDijujvzCU7jOCogB3
300
api.zoom.us/v2/metrics/meetings?page_size=300&type=past&from=2020-04-21&to=2020-04-30&next_page_token=h9rf5dSQcAiiK2ib1RhMcitdXIpAYgA1Tu4
300
api.zoom.us/v2/metrics/meetings?page_size=300&type=past&from=2020-04-21&to=2020-04-30&next_page_token=Vqn3PKTIjrLTJF66ItPikjqECGMAB7oCgh5
300
api.zoom.us/v2/metrics/meetings?page_size=300&type=past&from=2020-04-21&to=2020-04-30&next_page_token=esKAvWsgIqjqYECsRxM1tBwc3cDnTNO3vJ6
300
api.zoom.us/v2/metrics/meetings?page_size=300&type=past&from=2020-04-21&to=2020-04-30&next_page_token=mPhiBkcrOozu2OmLwcmx7ymMIC6wpbEhCR7
300
api.zoom.us/v2/metrics/meetings?page_size=300&type=past&from=2020-04-21&to=2020-04-30&next_page_token=LNEcWGxVQkqFRQX3ml17KSIeZGiEJI8sxB8
300

**normal cases:
api.zoom.us/v2/metrics/meetings?page_size=300&type=past&from=2020-04-21&to=2020-04-21
194

bringing forward the next token position can solve problem of smaller time range ( say from 04-21 to 04-22 where pagination is still needed)
However, i’m still having the issue with longer time range.

solution that works for smaller date range.

instead of
https://api.zoom.us/v2/metrics/meetings?page_size=300&type=past&from=2020-04-21&to=2020-04-22&next_page_token=qqqqq

do this:
https://api.zoom.us/v2/metrics/meetings?page_size=300&next_page_token=qqqqq&type=past&from=2020-04-21&to=2020-04-22

also, when i try to verify my code on web api testing page, i got mismatch information: i’m pagination using size of 300, and this is the last response and you can see the returned items is 147, and that mismatch the total records of 1209

Hey @zye,

That is strange, can you email this, your JWT Key and your Zoom account id to developersupport@zoom.us so we can get the info we need to debug the issue?

Thanks,
Tommy