getManagedBotToken()
Use this method to get the token of a managed bot. Returns the token as String on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
user_id | number | required | User identifier of the managed bot whose token will be returned |
returns
string
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { GetManagedBotTokenParams } from "@yaebal/types";
await bot.api.call<string>("getManagedBotToken", {
user_id: 123456789,
} satisfies GetManagedBotTokenParams);context shortcut
also available as ctx.getManagedBotToken() on
16
context types — see @yaebal/contexts.
/** Use this method to get the token of a managed bot. Returns the token as *String* on success. */
ctx.getManagedBotToken(params?: Omit<GetManagedBotTokenParams, "user_id">)official Bot API docs: https://core.telegram.org/bots/api/#getmanagedbottoken