Layer 220
ChannelsGetMessages
Get channel/supergroup messages
method
Users
Bots
channels.getMessages#ad8c9a23 channel:InputChannel id:Vector<InputMessage> = messages.Messages;
Parameters
| Name | Type | Description |
|---|---|---|
| Channel | InputChannel | Channel/supergroup |
| Id | Vector<InputMessage> | IDs of messages to get |
Returns
messages.MessagesPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 406 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | CHAT_NOT_MODIFIED | No changes were made to chat information because the new information you passed is identical to the current information. |
| 400 | FROZEN_PARTICIPANT_MISSING | The current account is frozen, and cannot access the specified peer. |
| 400 | MESSAGE_IDS_EMPTY | No message ids were provided. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
| 400 | USER_BANNED_IN_CHANNEL | You're banned from sending messages in supergroups/channels. |
Gogram Example
// ChannelsGetMessages - positional arguments result, err := client.ChannelsGetMessages(&tg.InputChannel{ChannelID: int64(123456789), AccessHash: int64(0)}, []tg.InputMessage{&tg.InputMessage{}}) if err != nil { // handle error } // result is *tg.MessagesMessages