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
| Name | Type | Required | Description |
|---|---|---|---|
FirstName | string | — | New user first name |
LastName | string | — | New user last name |
About | string | — | New bio |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | ABOUT_TOO_LONG | About string too long. |
| 400 | BUSINESS_CONNECTION_INVALID | The connection_id passed to the wrapping invokeWithBusinessConnection call is invalid. |
| 400 | FIRSTNAME_INVALID | The first name is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.updateProfile#78515775