Skip to main content

messages.migrateChat

Turn a basic group into a supergroup

func (c *Client) MessagesMigrateChat(ctx context.Context, chatid int64) (UpdatesClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.MessagesMigrateChat(ctx, chatid)
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
ChatIDint64yesBasic group to migrate

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400CHANNELS_TOO_MUCHYou have joined too many channels/supergroups.
403CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400CHAT_ID_INVALIDThe provided chat id is invalid.
500CHAT_INVALIDInvalid chat.
400PEER_ID_INVALIDThe provided peer id is invalid.

References