Layer 220
BotsSetCustomVerification
Verify a user or chat on behalf of an organization.
method
Users
Bots
bots.setCustomVerification#8b89dfbd flags:# enabled:flags.1?true bot:flags.0?InputUser peer:InputPeer custom_description:flags.2?string = Bool;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Enabled | flags.1?true | If set, adds the verification; otherwise removes verification. |
| Bot | flags.0?InputUser | Must not be set if invoked by a bot, must be set to the ID of an owned bot if invoked by a user. |
| Peer | InputPeer | The peer to verify |
| CustomDescription | flags.2?string | Custom description for the verification, the UTF-8 length limit for this field is contained in bot_verification_description_length_limit. If not set, Was verified by organization "organization_name" will be used as description. |
Returns
BoolPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | BOT_INVALID | This is not a valid bot. |
| 403 | BOT_VERIFIER_FORBIDDEN | This bot cannot assign verification icons. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
Gogram Example
// BotsSetCustomVerification - using Params struct result, err := client.BotsSetCustomVerification(&tg.BotsSetCustomVerificationParams{ Peer: &tg.InputPeerUser{UserID: int64(123456789)}, // Optional fields: // Enabled: true, // Bot: &tg.InputUserSelf{}, // CustomDescription: "...", }) if err != nil { // handle error } // result is *tg.Bool