User

Object defines a user.

Type schema is not available in the selected layer.

Constructors

Constructor Description
userEmpty Empty constructor, non-existent user.
user Indicates info about a certain user.

Unless specified otherwise, when updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).

See here » for an implementation of the logic to use when updating the local user peer database.

Methods

Method Description
account.updateProfile Updates user profile.
account.updateUsername Changes username for the current user.
account.changePhone Change the phone number of the current account
contacts.importContactToken Obtain user info from a temporary profile link.
messages.getFutureChatCreatorAfterLeave Group/channel owners only: returns the ID of the user that will become the new owner of the group if we decide to leave the group, see here » for more info on the full flow.
channels.getMessageAuthor Can only be invoked by non-bot admins of a monoforum », obtains the original sender of a message sent by other monoforum admins to the monoforum, on behalf of the channel associated to the monoforum.
bots.createBot Create a managed bot » owned by the current user and controlled by the specified manager bot.