Available methods

verifyUser()

Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.

parameters

parametertyperequireddescription
user_idnumberrequiredUnique identifier of the target user
custom_descriptionstringoptionalCustom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.

returns

boolean

usage in yaebal

not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.

bot.ts
import type { VerifyUserParams } from "@yaebal/types";

await bot.api.call<boolean>("verifyUser", {
  user_id: 123456789,
} satisfies VerifyUserParams);

context shortcut

also available as ctx.verifyUser() on 16 context types — see @yaebal/contexts.

context shortcut
/** Verifies a user [on behalf of the organization](https://telegram.org/verify#third-party-verification) which is represented by the bot. Returns *True* on success. */
ctx.verifyUser(params: Omit<VerifyUserParams, "user_id">)