Show media, files, and links of a channel

Using react. we want to create a side banner, very similar to facebook messenger, which allows you to see media (pics), files/attachments, and links shared in a given channel.

see here: Screenshot by Lightshot

is this possible? it’s not in UI kit.

1 Like

Did you ever figure this out?

I tried asking the docs bot and this is what it gave me:

To show media, files, and links of a channel, you can use the Sendbird Chat Platform API. Here are the steps:

  1. Retrieve the channel using the channel URL or ID.
  2. Use the “Retrieve a channel” API to get the channel information.
  3. Access the “messages” field of the channel response to get the list of messages.
  4. Iterate through the messages and filter for media, files, or links based on the message type.
  5. Display the media, files, or links to the users.

For more details, you can refer to the “Retrieving messages” section of the Sendbird Chat Platform API documentation.

Group channel collection | Chat JavaScript SDK | Sendbird Docs

Hello @Kris,

Welcome to the Sendbird Community.

The docs bot is correct. There isn’t a way to grab just all link/image data. That being said, if you’re going to utilize the Platform API, we highly recommend creating a wrapper API in your own service in order to prevent exposing your API-Token to users.

@Tyler Sorry I’m not very experienced so forgive me if it’s a dumb question! Do you mean that I should be calling my Node backend in order to retrieve the information then display the results on my RN app?

If you’re specifically looking to create something like this where you want to parse out all the files/links etc. Yes. You could technically do it on the client side but it would be best to handle it on the backend with some sort of caching mechanism so you’re not having to fetch every single message every time.

1 Like

Ahh ok thank you!

If you have time, would you be able to help me with my other question: How to `includeEmpty` for React Native GroupChannelListFragment