Skip to main content

account.updateProfile

Updates user profile.

func (c *Client) AccountUpdateProfile(ctx context.Context, request *AccountUpdateProfileRequest) (UserClass, error)

Calling this method

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

res, err := api.AccountUpdateProfile(ctx, &tg.AccountUpdateProfileRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UserClass
return nil
})

Parameters

NameTypeRequiredDescription
FirstNamestringNew user first name
LastNamestringNew user last name
AboutstringNew bio

Returns

UserClass

Possible errors

CodeTypeDescription
400ABOUT_TOO_LONGAbout string too long.
400BUSINESS_CONNECTION_INVALIDThe connection_id passed to the wrapping invokeWithBusinessConnection call is invalid.
400FIRSTNAME_INVALIDThe first name is invalid.

References