# Listing a user's channel messages doesn't return a next\_page\_token sometimes

**URL:** <https://devforum.zoom.us/t/listing-a-users-channel-messages-doesnt-return-a-next-page-token-sometimes/59735>\
**Category:** API and Webhooks\
**Created:** [November 3, 2021, 10:26am UTC](https://devforum.zoom.us/t/listing-a-users-channel-messages-doesnt-return-a-next-page-token-sometimes/59735 "2021-11-03T10:26:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![samspedding](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@samspedding](https://devforum.zoom.us/u/samspedding)\
**Post date:** [November 3, 2021, 10:26am UTC](https://devforum.zoom.us/t/listing-a-users-channel-messages-doesnt-return-a-next-page-token-sometimes/59735/1 "2021-11-03T10:26:07Z")

</div>

**Description**  
When making an API call to chat/users/{userID}/messages?to\_channel={channelID} the next\_page\_token is sometimes not returned.

**Error**  
next\_page\_token is blank despite there being a next page

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

**Which Endpoint/s?**  
chat/users/{userID}/messages

**How To Reproduce (If applicable)**  
I’m making a call to a channel with a total of 8 messages from various users. The following correctly returns all 8 messages:

`https://api.zoom.us/v2/chat/users/E0TXvj6DRNiP6L4LXbOz7g/messages?to_channel=4f52741121a646d2b6e297b9cf06350b&page_size=10&date=2021-10-29`

If I set `page_size=3` I get 3 messages back but `"next_page_token": ""`, so the remaining five messages cannot be acquired.

Confusingly if I set `page_size=2` I do get a functioning next\_page\_token, but the second page (out of an expected four pages) has no next\_page\_token so the remaining two pages again cannot be called.

**Screenshots (If applicable)**  
N/A

**Additional context**  
I believe this is also an issue with getting user’s direct chat messages (i.e. with `to_contact={userEmail}` set). However I’ve not been able to reproduce this consistently.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 4, 2021, 11:31am UTC](https://devforum.zoom.us/t/listing-a-users-channel-messages-doesnt-return-a-next-page-token-sometimes/59735/2 "2021-11-04T11:31:42Z")

</div>

Hi @samspedding,

Thanks for reaching out about this. Is it possible to share an example request/response with us by opening up a request [here](https://devsupport.zoom.us)? This will help us to take a closer look.

Thanks!  
Will

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [December 4, 2021, 9:32pm UTC](https://devforum.zoom.us/t/listing-a-users-channel-messages-doesnt-return-a-next-page-token-sometimes/59735/3 "2021-12-04T21:32:19Z")

</div>

Closed on December 4, 2021, 9:32pm UTC

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