Available methods

setBusinessAccountProfilePhoto()

Changes the profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.

parameters

parametertyperequireddescription
business_connection_idstringrequiredUnique identifier of the business connection
photoInputProfilePhotorequiredThe new profile photo to set
is_publicbooleanoptionalPass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.

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 { SetBusinessAccountProfilePhotoParams } from "@yaebal/types";

await bot.api.call<boolean>("setBusinessAccountProfilePhoto", {
  business_connection_id: "...",
  photo: {} /* InputProfilePhoto */,
} satisfies SetBusinessAccountProfilePhotoParams);