setBusinessAccountUsername()
Changes the username of a managed business account. Requires the can_change_username business bot right. Returns True on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
business_connection_id | string | required | Unique identifier of the business connection |
username | string | optional | The new value of the username for the business account; 0-32 characters |
returns
boolean
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { SetBusinessAccountUsernameParams } from "@yaebal/types";
await bot.api.call<boolean>("setBusinessAccountUsername", {
business_connection_id: "...",
} satisfies SetBusinessAccountUsernameParams);official Bot API docs: https://core.telegram.org/bots/api/#setbusinessaccountusername