# Retrieving last page using next\_token

**URL:** <https://devforum.zoom.us/t/retrieving-last-page-using-next-token/19273>\
**Category:** API and Webhooks\
**Created:** [May 27, 2020, 4:54pm UTC](https://devforum.zoom.us/t/retrieving-last-page-using-next-token/19273 "2020-05-27T16:54:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zye](https://avatars.discourse-cdn.com/v4/letter/z/9dc877/32.png) [@zye](https://devforum.zoom.us/u/zye)\
**Post date:** [May 27, 2020, 4:54pm UTC](https://devforum.zoom.us/t/retrieving-last-page-using-next-token/19273/1 "2020-05-27T16:54:53Z")

</div>

**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](http://api.zoom.us/v2/metrics/meetings)

---

<div class="post-metadata">

**Author:** ![zye](https://avatars.discourse-cdn.com/v4/letter/z/9dc877/32.png) [@zye](https://devforum.zoom.us/u/zye)\
**Post date:** [May 27, 2020, 4:55pm UTC](https://devforum.zoom.us/t/retrieving-last-page-using-next-token/19273/2 "2020-05-27T16:55:01Z")

</div>

**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](http://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](http://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](http://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](http://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](http://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](http://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](http://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](http://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](http://api.zoom.us/v2/metrics/meetings?page_size=300&type=past&from=2020-04-21&to=2020-04-21)  
194

---

<div class="post-metadata">

**Author:** ![zye](https://avatars.discourse-cdn.com/v4/letter/z/9dc877/32.png) [@zye](https://devforum.zoom.us/u/zye)\
**Post date:** [May 27, 2020, 5:15pm UTC](https://devforum.zoom.us/t/retrieving-last-page-using-next-token/19273/3 "2020-05-27T17:15:16Z")

</div>

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](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](https://api.zoom.us/v2/metrics/meetings?page_size=300&next_page_token=qqqqq&type=past&from=2020-04-21&to=2020-04-22)

---

<div class="post-metadata">

**Author:** ![zye](https://avatars.discourse-cdn.com/v4/letter/z/9dc877/32.png) [@zye](https://devforum.zoom.us/u/zye)\
**Post date:** [May 27, 2020, 6:25pm UTC](https://devforum.zoom.us/t/retrieving-last-page-using-next-token/19273/4 "2020-05-27T18:25:02Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/1/1f3396937088a1a28102b93c7546294682466d69.png)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [June 1, 2020, 11:27pm UTC](https://devforum.zoom.us/t/retrieving-last-page-using-next-token/19273/5 "2020-06-01T23:27:11Z")

</div>

Hey @zye,

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

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 9:39pm UTC](https://devforum.zoom.us/t/retrieving-last-page-using-next-token/19273/6 "2020-08-21T21:39:44Z")

</div>

Closed on August 21, 2020, 9:39pm UTC


