# How to access the code snippets in chat API?

**URL:** <https://devforum.zoom.us/t/how-to-access-the-code-snippets-in-chat-api/122139>\
**Category:** Chat\
**Created:** [December 9, 2024, 5:59am UTC](https://devforum.zoom.us/t/how-to-access-the-code-snippets-in-chat-api/122139 "2024-12-09T05:59:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![viraj.kanwade](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/viraj.kanwade/32/65433_2.png) [@viraj.kanwade](https://devforum.zoom.us/u/viraj.kanwade)\
**Post date:** [December 9, 2024, 5:59am UTC](https://devforum.zoom.us/t/how-to-access-the-code-snippets-in-chat-api/122139/1 "2024-12-09T05:59:27Z")

</div>

How do I get the original code snippet shared on a channel?

Currently it returns  
“message”: “Viraj Kanwade has sent you a code snippet”,

---

<div class="post-metadata">

**Author:** ![viraj.kanwade](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/viraj.kanwade/32/65433_2.png) [@viraj.kanwade](https://devforum.zoom.us/u/viraj.kanwade)\
**Post date:** [December 12, 2024, 4:57pm UTC](https://devforum.zoom.us/t/how-to-access-the-code-snippets-in-chat-api/122139/2 "2024-12-12T16:57:12Z")

</div>

@gianni.zoom Can you please check? Thanks

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [December 13, 2024, 6:28pm UTC](https://devforum.zoom.us/t/how-to-access-the-code-snippets-in-chat-api/122139/3 "2024-12-13T18:28:27Z")

</div>

Hi @viraj.kanwade which endpoint specifically are you using? Please link it. Thanks!

---

<div class="post-metadata">

**Author:** ![viraj.kanwade](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/viraj.kanwade/32/65433_2.png) [@viraj.kanwade](https://devforum.zoom.us/u/viraj.kanwade)\
**Post date:** [December 14, 2024, 11:48pm UTC](https://devforum.zoom.us/t/how-to-access-the-code-snippets-in-chat-api/122139/5 "2024-12-14T23:48:52Z")

</div>

Hi Gianni,

I am using the get user messages with to\_channel param. f"/v2/chat/users/{zoom\_user\_id}/messages"

I couldn’t find any specific API for code snippets.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [December 16, 2024, 7:43pm UTC](https://devforum.zoom.us/t/how-to-access-the-code-snippets-in-chat-api/122139/6 "2024-12-16T19:43:11Z")

</div>

Hi @viraj.kanwade thank you for clarifying. Can you please share the full response you receive? Do you see any indication of file information with download url in the response schema?

---

<div class="post-metadata">

**Author:** ![viraj.kanwade](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/viraj.kanwade/32/65433_2.png) [@viraj.kanwade](https://devforum.zoom.us/u/viraj.kanwade)\
**Post date:** [December 17, 2024, 7:43pm UTC](https://devforum.zoom.us/t/how-to-access-the-code-snippets-in-chat-api/122139/7 "2024-12-17T19:43:35Z")

</div>

Got it. It gets attached as files.  
Altough little confusing structure.  
There is a files array and then a file details attributes at the top level again.

‘files’: [{‘file\_id’: 'XYZ,  
‘file\_name’: ‘Untitled.py.zip’,  
‘file\_size’: 1273,  
‘download\_url’: ‘XYZ’}],  
‘file\_id’: 'XYZ,  
‘file\_name’: ‘Untitled.py.zip’,  
‘file\_size’: 1273,  
‘download\_url’: ‘XYZ’},

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [December 17, 2024, 9:07pm UTC](https://devforum.zoom.us/t/how-to-access-the-code-snippets-in-chat-api/122139/8 "2024-12-17T21:07:56Z")

</div>

@viraj.kanwade yes, this is in the documentation 🙂

Glad you were able to resolve!
