# Getting partial message when using 'List user's chat messages'

**URL:** <https://devforum.zoom.us/t/getting-partial-message-when-using-list-users-chat-messages/94162>\
**Category:** API and Webhooks\
**Tags:** api\
**Created:** [August 29, 2023, 8:12pm UTC](https://devforum.zoom.us/t/getting-partial-message-when-using-list-users-chat-messages/94162 "2023-08-29T20:12:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshua.allen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/joshua.allen/32/51545_2.png) [@joshua.allen](https://devforum.zoom.us/u/joshua.allen)\
**Post date:** [August 29, 2023, 8:12pm UTC](https://devforum.zoom.us/t/getting-partial-message-when-using-list-users-chat-messages/94162/1 "2023-08-29T20:12:36Z")

</div>

API method: List user’s chat messages  
Endpoint: /chat/users/{userId}/messages  
Documentation: [Zoom Team Chat API](https://developers.zoom.us/docs/api/rest/reference/chat/methods/#operation/getChatMessages)

Hello,

I had a question about expected behavior for the ‘list users chat messages’ method linked above. When using the search key parameter for messages, I have been able to connect and retrieve the desired message. However, it appears to be truncated to a limited number of characters on either side of the search key. I don’t see anything in the documentation that suggests this behavior.

I know that I could get the full message by taking the message id obtained from the response and passing that to the ‘get a message’ endpoint (/chat/users/{userId}/messages/{messageId}), However I know it’s best practice to limit API calls whenever possible so I wanted to check if there was a way to retrieve the entire message in the ‘List user’s chat messages’ call, or if I’m just doing something wrong.

HEADERS-{“Authorization”: “Bearer {access\_token}”

QUERY-STRING PARAMETERS- {  
“to\_channel”: channel\_id,  
“search\_type”: “message”,  
“search\_key”: ‘string\_to\_search\_for’,  
“from”: last\_week\_date  
}

App type: Oath

---

<div class="post-metadata">

**Author:** ![michael.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael.zoom/32/37213_2.png) [@michael.zoom](https://devforum.zoom.us/u/michael.zoom)\
**Post date:** [August 31, 2023, 1:51pm UTC](https://devforum.zoom.us/t/getting-partial-message-when-using-list-users-chat-messages/94162/2 "2023-08-31T13:51:35Z")

</div>

Hey @joshua.allen welcome and thanks for posting!

To specify, you’re saying the text of the message in the response is truncated, as in - the response only includes a partial message (or a list of partial messages)?

@ojus.zoom do we know if this is expected behavior?

I can imagine this being expected behavior to limit the size of the response. But we can check on this and improve the API reference if that’s the case. Agreed, Josh, we don’t want you to have to make unnecessary API requests. We’ll look into it.

---

<div class="post-metadata">

**Author:** ![joshua.allen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/joshua.allen/32/51545_2.png) [@joshua.allen](https://devforum.zoom.us/u/joshua.allen)\
**Post date:** [August 31, 2023, 2:51pm UTC](https://devforum.zoom.us/t/getting-partial-message-when-using-list-users-chat-messages/94162/3 "2023-08-31T14:51:18Z")

</div>

Hey Michael, Thank you for responding.

Yes, the content of the message under response[“messages”][0][“message”] is truncated. I’ve double checked to make sure the message isn’t split up in a list and have confirmed that this is not the case.

Giving an example, using the string ‘pdf’ as the search key, the message I want to retrieve is as follows,  
  
‘florida department of emergency management, I think. As to what it actually is? I have no clue. I helped Aashish write a thing to strip the first page from dropped pdf’s. That’s the extent of my knowledge.’   
  
and the string returned from the call is

‘…a thing to strip the first page from dropped pdf’s. That’s the extent of my knowledge.’

Additionally, if this is helpful, after doing some additional testing I found that the message returned seems to be what is displayed when searching messages in the app itself. That would make since since I assume these functions and linked somewhere in the back end. I can include a screenshot of this behavior if you would like.

---

<div class="post-metadata">

**Author:** ![michael.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael.zoom/32/37213_2.png) [@michael.zoom](https://devforum.zoom.us/u/michael.zoom)\
**Post date:** [September 11, 2023, 2:16pm UTC](https://devforum.zoom.us/t/getting-partial-message-when-using-list-users-chat-messages/94162/4 "2023-09-11T14:16:55Z")

</div>

Woof, sorry for the late reply @joshua.allen , I missed the response. Can you please provide that screenshot? We’re working with our chat engineering team on this. I don’t know if it’s expected yet, this might have been decided to reduce JSON size for the list message endpoint.

---

<div class="post-metadata">

**Author:** ![joshua.allen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/joshua.allen/32/51545_2.png) [@joshua.allen](https://devforum.zoom.us/u/joshua.allen)\
**Post date:** [September 11, 2023, 3:19pm UTC](https://devforum.zoom.us/t/getting-partial-message-when-using-list-users-chat-messages/94162/6 "2023-09-11T15:19:00Z")

</div>

No worries, I appreciate you getting back to me. and sure thing. That message is the same exact message returned in the API call. But not the full length of the message.

 ![zoom_example](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/6/c613283c3ef1e2b1c6e99393ab0a133fd55163bb.png)

---

<div class="post-metadata">

**Author:** ![joshua.allen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/joshua.allen/32/51545_2.png) [@joshua.allen](https://devforum.zoom.us/u/joshua.allen)\
**Post date:** [December 28, 2023, 3:53pm UTC](https://devforum.zoom.us/t/getting-partial-message-when-using-list-users-chat-messages/94162/7 "2023-12-28T15:53:51Z")

</div>

@michael.zoom Just wanted to follow up and ask if you ever got a response from the chat engineering team on whether this was expected behavior or not.

Thank you.

---

<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 31, 2024, 7:30am UTC](https://devforum.zoom.us/t/getting-partial-message-when-using-list-users-chat-messages/94162/8 "2024-12-31T07:30:21Z")

</div>

Closed on December 31, 2024, 7:30am UTC

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