bots.setCustomVerification
Verify a user or chat on behalf of an organization ».
func (c *Client) BotsSetCustomVerification(ctx context.Context, request *BotsSetCustomVerificationRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.BotsSetCustomVerification(ctx, &tg.BotsSetCustomVerificationRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Enabled | bool | — | If set, adds the verification; otherwise removes verification. |
Bot | InputUserClass | — | 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 | InputPeerClass | yes | The peer to verify |
CustomDescription | 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
bool
Possible 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. |
References
- Official documentation
- Generated Go reference
- TL definition:
bots.setCustomVerification#8b89dfbd