/ SDKs / .NET
SDKs
Chat SDKs .NET v4
Chat SDKs .NET
Chat SDKs
.NET
Version 4

Retrieve a message

Copy link

You can retrieve a specific message in an open or group channel by creating and passing the SbMessageRetrievalParams object as an argument into the GetMessage() method.

SbMessageRetrievalParams retrievalParams = new SbMessageRetrievalParams(CHANNEL_URL, SbChannelType.Open, MESSAGE_ID);

SendbirdChat.Message.GetMessage(retrievalParams, (inMessage, inError) =>
{
    if (inError != null)
        return; // Handle error.
});

List of properties

Copy link

This table only contains properties shown in the code above. To see the comprehensive list of all available methods and properties, see SbMessageRetrievalParams.

Property nameTypeDescription

ChannelType

SbChannelType

Specifies the type of the channel.

ChannelUrl

string

Specifies the URL of the channel.

MessageId

Int

Specifies the unique ID of the message.


Retrieve the last message of a group channel

Copy link

You can retrieve and view the last message of a group channel.

SbBaseMessage lastMessage = groupChannel.LastMessage;