Available methods

setBusinessAccountUsername()

Changes the username of a managed business account. Requires the can_change_username business bot right. Returns True on success.

parameters

parametertyperequireddescription
business_connection_idstringrequiredUnique identifier of the business connection
usernamestringoptionalThe 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.

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

await bot.api.call<boolean>("setBusinessAccountUsername", {
  business_connection_id: "...",
} satisfies SetBusinessAccountUsernameParams);