Skip to main content

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

NameTypeRequiredDescription
EnabledboolIf set, adds the verification; otherwise removes verification.
BotInputUserClassMust not be set if invoked by a bot, must be set to the ID of an owned bot if invoked by a user.
PeerInputPeerClassyesThe peer to verify
CustomDescriptionstringCustom 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

CodeTypeDescription
400BOT_INVALIDThis is not a valid bot.
403BOT_VERIFIER_FORBIDDENThis bot cannot assign verification icons.
400PEER_ID_INVALIDThe provided peer id is invalid.

References