Layer 220
ChannelsGetSendAs
Obtains a list of peers that can be used to send messages in a specific group
method
Users
channels.getSendAs#e785a43f flags:# for_paid_reactions:flags.0?true peer:InputPeer = channels.SendAsPeers;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| ForPaidReactions | flags.0?true | If set, fetches the list of peers that can be used to send paid reactions to messages of a specific peer. |
| Peer | InputPeer | The group where we intend to send messages |
Returns
channels.SendAsPeersPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | CHAT_ID_INVALID | The provided chat id is invalid. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
Gogram Example
// ChannelsGetSendAs - using Params struct result, err := client.ChannelsGetSendAs(&tg.ChannelsGetSendAsParams{ Peer: &tg.InputPeerUser{UserID: int64(123456789)}, // Optional fields: // ForPaidReactions: true, }) if err != nil { // handle error } // result is *tg.ChannelsSendAsPeers