Listing a user's channel messages doesn't return a next_page_token sometimes

When making an API call to chat/users/{userID}/messages?to_channel={channelID} the next_page_token is sometimes not returned.

next_page_token is blank despite there being a next page

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

Which Endpoint/s?

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:

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)

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.

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? This will help us to take a closer look.


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