Protocol Documentation

Table of Contents

authentication.proto

Top

AuthSession

Authentication session

FieldTypeLabelDescription
id int32

Unuque ID of session

auth_holder AuthHolder

holder of session. 1 - this device, 2 - other.

app_id int32

Application Id that you set during authorization

app_title string

Deprecated

device_title string

Deprecated

auth_time int32

Time of session creating

auth_location string

Two-letter country code of session create

latitude google.protobuf.DoubleValue

longitude google.protobuf.DoubleValue

ForceReloadContacts

Tells the client to clear contacts and load them again

ForceReloadDialogs

Tells the client to clear dialogs and load them again

ForceReloadField

Notification to force client to reload some entities from server

Just for old clients. Should be ignore.

FieldTypeLabelDescription
forceReloadDialogs ForceReloadDialogs

forceReloadContacts ForceReloadContacts

forceReloadHistory ForceReloadHistory

ForceReloadHistory

Tells the client to clear the specified conversation and load it again

peer the peer whose history should be reloaded

FieldTypeLabelDescription
peer Peer

RequestChangePassword

FieldTypeLabelDescription
old_password string

new_password string

RequestCompleteOAuth2

Complete OAuth2 Authentication - deprecated

FieldTypeLabelDescription
transaction_hash string

code string

RequestGetAuthSessions

Getting of all active user's authentication sessions

RequestGetOAuth2Params

Loading OAuth2 Parameters - deprecated

FieldTypeLabelDescription
transaction_hash string

redirect_url string

RequestResendCode

Performs code resend

FieldTypeLabelDescription
transaction_hash string

Hash of the authorization transaction *

RequestSendAuthCallObsolete

Requesting Phone activation

FieldTypeLabelDescription
phone_number int64

sms_hash string

app_id int32

api_key string

RequestSendAuthCodeObsolete

Sending SMS with activation code

FieldTypeLabelDescription
phone_number int64

app_id int32

api_key string

RequestSendCodeByPhoneCall

Dial phone and dictate auth code

FieldTypeLabelDescription
transaction_hash string

Hash from ResponseStartPhoneAuth

RequestSignInObsolete

Performing user signin - deprecated

FieldTypeLabelDescription
phone_number int64

sms_hash string

sms_code string

device_hash bytes

device_title string

app_id int32

app_key string

RequestSignOut

SignOut current session

RequestSignUp

Perform user SignUp

FieldTypeLabelDescription
transaction_hash string

Hash of the authorization transaction *

name string

Your name

sex Sex

Use it in case of anonymous authorization (deprecated)

password google.protobuf.StringValue

RequestSignUpObsolete

Performing user signup. If user perform signup on already registered user it just override previous

profile information

FieldTypeLabelDescription
phone_number int64

sms_hash string

sms_code string

name string

device_hash bytes

device_title string

app_id int32

app_key string

is_silent bool

RequestStartAnonymousAuth

Starting Anonymous login - deprecated

FieldTypeLabelDescription
name string

app_id int32

api_key string

device_hash bytes

device_title string

time_zone google.protobuf.StringValue

preferred_languages string repeated

RequestStartEmailAuth

Start EMail Activation

FieldTypeLabelDescription
email string

app_id int32

Application id, choose it by yourself and hold during authorization process *

api_key string

Deprecated field - keep it empty *

device_hash bytes

Deprecated field - keep it empty *

device_title string

Some title, choose it by yourself and hold during authorization process *

time_zone google.protobuf.StringValue

Your timezone *

preferred_languages string repeated

First language from this array will be used for some notifications from server *

RequestStartPhoneAuth

Start Phone Activation

FieldTypeLabelDescription
phone_number int64

app_id int32

Application id, choose it by yourself and hold during authorization process *

api_key string

Deprecated field - keep it empty *

device_hash bytes

Deprecated field - keep it empty *

device_title string

Some title, choose it by yourself and hold during authorization process *

time_zone google.protobuf.StringValue

Your timezone *

preferred_languages string repeated

First language from this array will be used for some notifications from server *

RequestStartTokenAuth

Starting token-based login - to authorize bot

FieldTypeLabelDescription
token string

Token received from BotFather *

app_id int32

Application id, choose it by yourself and hold during authorization process *

api_key string

Deprecated field - keep it empty *

device_hash bytes

Deprecated field - keep it empty *

device_title string

Some title, choose it by yourself and hold during authorization process *

time_zone google.protobuf.StringValue

Your timezone *

preferred_languages string repeated

First language from this array will be used for some notifications from server *

RequestStartUsernameAuth

Starting Login Authentication

FieldTypeLabelDescription
username string

app_id int32

Application id, choose it by yourself and hold during authorization process *

api_key string

Deprecated field - keep it empty *

device_hash bytes

Deprecated field - keep it empty *

device_title string

Some title, choose it by yourself and hold during authorization process *

time_zone google.protobuf.StringValue

preferred_languages string repeated

First language from this array will be used for some notifications from server *

RequestTerminateAllSessions

SignOut on all exept current sessions

RequestTerminateSession

SignOut on specified user's session

FieldTypeLabelDescription
id int32

Session id

RequestValidateCode

Performing user sign in.

FieldTypeLabelDescription
transaction_hash string

Hash of the authorization transaction *

code string

Authorization code

RequestValidatePassword

Validation of account password

FieldTypeLabelDescription
transaction_hash string

Hash of the authorization transaction *

password string

ResponseAuth

Authentication result

FieldTypeLabelDescription
user User

Registered/authorized user

config Config

Config for that user

config_hash google.protobuf.Int64Value

Hash of config to later usage

extra_info AuthExtraInfoType repeated

ResponseGetAuthSessions

FieldTypeLabelDescription
user_auths AuthSession repeated

Active user's sessions

ResponseGetOAuth2Params

Deprecated

FieldTypeLabelDescription
auth_url string

ResponseSendAuthCodeObsolete

FieldTypeLabelDescription
sms_hash string

is_registered bool

ResponseStartEmailAuth

FieldTypeLabelDescription
transaction_hash string

Hash of authorization transaction *

is_registered bool

Deprecated

activation_type EmailActivationType

Code or password - call ValidateCode if code *

ResponseStartPhoneAuth

FieldTypeLabelDescription
transaction_hash string

Hash of authorization transaction *

is_registered bool

Deprecated

activation_type PhoneActivationType

Code or password - call ValidateCode if code *

ResponseStartUsernameAuth

FieldTypeLabelDescription
transaction_hash string

Hash of authorization transaction *

is_registered bool

Deprecated

UpdateForceReloadState

This update is sent by the server to force a client to reload its data

FieldTypeLabelDescription
fields ForceReloadField repeated

AuthExtraInfoType

NameNumberDescription
NONE_EXTRA_INFO 0

NEED_CHANGE_PASSWORD 1

AuthHolder

Holder of session

NameNumberDescription
AUTHHOLDER_UNKNOWN 0

AUTHHOLDER_THISDEVICE 1

AUTHHOLDER_OTHERDEVICE 2

EmailActivationType

NameNumberDescription
EMAILACTIVATIONTYPE_UNKNOWN 0

EMAILACTIVATIONTYPE_CODE 1

EMAILACTIVATIONTYPE_OAUTH2 2

EMAILACTIVATIONTYPE_PASSWORD 3

PhoneActivationType

NameNumberDescription
PHONEACTIVATIONTYPE_UNKNOWN 0

PHONEACTIVATIONTYPE_CODE 1

PHONEACTIVATIONTYPE_PASSWORD 2

Authentication

Method NameRequest TypeResponse TypeDescription
StartPhoneAuth RequestStartPhoneAuth ResponseStartPhoneAuth

Start authorization by phone

SendCodeByPhoneCall RequestSendCodeByPhoneCall ResponseVoid

Resend code by transaction hash

StartEmailAuth RequestStartEmailAuth ResponseStartEmailAuth

Start email authorization process

StartAnonymousAuth RequestStartAnonymousAuth ResponseAuth

Deprecated

StartTokenAuth RequestStartTokenAuth ResponseAuth

Start token auth authorization (actual for bots)

StartUsernameAuth RequestStartUsernameAuth ResponseStartUsernameAuth

Start login/password authorization process

ValidateCode RequestValidateCode ResponseAuth

Validate code received by phone or email Returns error if user does not exist

ResendCode RequestResendCode ResponseVoid

Resend code if you don't receive it with first attempt

ValidatePassword RequestValidatePassword ResponseAuth

Validate your passwword

GetOAuth2Params RequestGetOAuth2Params ResponseGetOAuth2Params

Deprecated

CompleteOAuth2 RequestCompleteOAuth2 ResponseAuth

Deprecated

SignUp RequestSignUp ResponseAuth

Sign up existed user

GetAuthSessions RequestGetAuthSessions ResponseGetAuthSessions

Returns all authorized user's sessions

TerminateSession RequestTerminateSession ResponseVoid

Deprecated. Does not produce any effect.

TerminateAllSessions RequestTerminateAllSessions ResponseVoid

Log out user

SignOut RequestSignOut ResponseVoid

Log out current session

SignInObsolete RequestSignInObsolete ResponseAuth

Deprecated

SignUpObsolete RequestSignUpObsolete ResponseAuth

Deprecated

SendAuthCodeObsolete RequestSendAuthCodeObsolete ResponseSendAuthCodeObsolete

Deprecated

SendAuthCallObsolete RequestSendAuthCallObsolete ResponseVoid

Deprecated

ChangePassword RequestChangePassword ResponseVoid

Methods with HTTP bindings

Method Name Method Pattern Body
StartPhoneAuth POST /v1/grpc/Authentication/StartPhoneAuth *
SendCodeByPhoneCall POST /v1/grpc/Authentication/SendCodeByPhoneCall *
StartEmailAuth POST /v1/grpc/Authentication/StartEmailAuth *
StartAnonymousAuth POST /v1/grpc/Authentication/StartAnonymousAuth *
StartTokenAuth POST /v1/grpc/Authentication/StartTokenAuth *
StartUsernameAuth POST /v1/grpc/Authentication/StartUsernameAuth *
ValidateCode POST /v1/grpc/Authentication/ValidateCode *
ResendCode POST /v1/grpc/Authentication/ResendCode *
ValidatePassword POST /v1/grpc/Authentication/ValidatePassword *
GetOAuth2Params POST /v1/grpc/Authentication/GetOAuth2Params *
CompleteOAuth2 POST /v1/grpc/Authentication/CompleteOAuth2 *
SignUp POST /v1/grpc/Authentication/SignUp *
GetAuthSessions POST /v1/grpc/Authentication/GetAuthSessions *
TerminateSession POST /v1/grpc/Authentication/TerminateSession *
TerminateAllSessions POST /v1/grpc/Authentication/TerminateAllSessions *
SignOut POST /v1/grpc/Authentication/SignOut *
SignInObsolete POST /v1/grpc/Authentication/SignInObsolete *
SignUpObsolete POST /v1/grpc/Authentication/SignUpObsolete *
SendAuthCodeObsolete POST /v1/grpc/Authentication/SendAuthCodeObsolete *
SendAuthCallObsolete POST /v1/grpc/Authentication/SendAuthCallObsolete *
ChangePassword POST /v1/grpc/Authentication/ChangePassword *

clickroad.proto

Top

RequestTrackEvent

FieldTypeLabelDescription
cid string

metrics TrackMetric repeated

ResponseTrackEvent

FieldTypeLabelDescription
cid string

TrackContext

FieldTypeLabelDescription
context TrackContext.ContextEntry repeated

TrackContext.ContextEntry

FieldTypeLabelDescription
key string

value string

TrackError

FieldTypeLabelDescription
message string

fatal bool

TrackEvent

FieldTypeLabelDescription
category string

action string

label google.protobuf.StringValue

value google.protobuf.DoubleValue

TrackMetric

FieldTypeLabelDescription
time google.protobuf.Timestamp

context TrackContext

screen_view TrackScreenView

event TrackEvent

timing TrackTiming

social TrackSocial

error TrackError

TrackScreenView

FieldTypeLabelDescription
name string

source google.protobuf.StringValue

url google.protobuf.StringValue

TrackSocial

FieldTypeLabelDescription
network string

action string

target string

TrackTiming

FieldTypeLabelDescription
category string

variable string

time int64

label google.protobuf.StringValue

ClickRoad

Method NameRequest TypeResponse TypeDescription
TrackEvent RequestTrackEvent ResponseTrackEvent

config_sync.proto

Top

FeatureFlag

FieldTypeLabelDescription
key string

value string

clock int64

Parameter

Syncing Parameter

FieldTypeLabelDescription
key string

Key of parameter

value string

Value of parameter

RequestEditParameter

Change parameter value

FieldTypeLabelDescription
key string

value google.protobuf.StringValue

RequestFeatureFlags

FieldTypeLabelDescription
clock int64

RequestGetParameters

Getting Parameters

ResponseFeatureFlags

FieldTypeLabelDescription
feature_config FeatureFlag repeated

ResponseGetParameters

FieldTypeLabelDescription
parameters Parameter repeated

UpdateFeatureFlagChanged

FieldTypeLabelDescription
feature FeatureFlag

UpdateParameterChanged

Update about parameter change

FieldTypeLabelDescription
key string

value google.protobuf.StringValue

ConfigSync

Method NameRequest TypeResponse TypeDescription
GetParameters RequestGetParameters ResponseGetParameters

EditParameter RequestEditParameter ResponseSeq

FeatureFlags RequestFeatureFlags ResponseFeatureFlags

Methods with HTTP bindings

Method Name Method Pattern Body
GetParameters POST /v1/grpc/ConfigSync/GetParameters *
EditParameter POST /v1/grpc/ConfigSync/EditParameter *
FeatureFlags POST /v1/grpc/ConfigSync/FeatureFlags *

contacts.proto

Top

EmailToImport

Email for import

FieldTypeLabelDescription
email string

email for importing

name google.protobuf.StringValue

optional name for contact

PhoneToImport

Phone for import

FieldTypeLabelDescription
phone_number int64

phone number for import in international format

name google.protobuf.StringValue

optional name for contact

RequestAddContact

Adding contact to contact list

FieldTypeLabelDescription
uid int32

access_hash int64

RequestDeferredImportContacts

Importing phones and emails for building contact list

Import evaluated lazily, response does not contain any info

Maximum amount of items for import per method call equals to 100.

FieldTypeLabelDescription
phones PhoneToImport repeated

emails EmailToImport repeated

RequestGetContacts

Getting current contact list

SHA256 hash of list of a comma-separated list of contact UIDs in ascending

order may be passed in contactsHash parameter.

If the contact list was not changed, isNotChanged will be true.

FieldTypeLabelDescription
contacts_hash string

optimizations UpdateOptimization repeated

RequestImportContacts

Importing phones and emails for building contact list

Maximum amount of items for import per method call equals to 100.

FieldTypeLabelDescription
phones PhoneToImport repeated

emails EmailToImport repeated

optimizations UpdateOptimization repeated

Optimizations drops some info from response to decrease traffic and latency

RequestRemoveContact

Removing contact from contact list

FieldTypeLabelDescription
uid int32

access_hash int64

RequestSearchContacts

Searching contacts by user's query

FieldTypeLabelDescription
request string

optimizations UpdateOptimization repeated

ResponseDeferredImportContacts

FieldTypeLabelDescription
task_id string

ResponseGetContacts

FieldTypeLabelDescription
users User repeated

is_not_changed bool

user_peers UserOutPeer repeated

ResponseImportContacts

FieldTypeLabelDescription
users User repeated

Registered contacts

seq int32

Deprecated

state bytes

Server state related to current client, used by server only

user_peers UserOutPeer repeated

Optimizations drops some info from response to decrease traffic and latency

ResponseSearchContacts

FieldTypeLabelDescription
users User repeated

user_peers UserOutPeer repeated

UpdateContactRegistered

Update about contact registration

FieldTypeLabelDescription
uid int32

User id of a registered contact

is_silent bool

deprecated

date int64

deprecated

mid UUIDValue

deprecated

UpdateContactsAddTaskSuspended

Update about suspending task - normally it should be ignored

FieldTypeLabelDescription
task_id string

UpdateContactsAdded

Update about contacts added

FieldTypeLabelDescription
uids int32 repeated

User ids of the registered contacts

task_id google.protobuf.StringValue

Id of the task that finished

UpdateContactsRemoved

Update about contacts removed

FieldTypeLabelDescription
uids int32 repeated

Contacts

Method NameRequest TypeResponse TypeDescription
ImportContacts RequestImportContacts ResponseImportContacts

Import contacts and wait while query is not finished

DeferredImportContacts RequestDeferredImportContacts ResponseDeferredImportContacts

Same as above, but without waiting response

GetContacts RequestGetContacts ResponseGetContacts

RemoveContact RequestRemoveContact ResponseSeq

AddContact RequestAddContact ResponseSeq

SearchContacts RequestSearchContacts ResponseSearchContacts

Search contacts by query string

Methods with HTTP bindings

Method Name Method Pattern Body
ImportContacts POST /v1/grpc/Contacts/ImportContacts *
DeferredImportContacts POST /v1/grpc/Contacts/DeferredImportContacts *
GetContacts POST /v1/grpc/Contacts/GetContacts *
RemoveContact POST /v1/grpc/Contacts/RemoveContact *
AddContact POST /v1/grpc/Contacts/AddContact *
SearchContacts POST /v1/grpc/Contacts/SearchContacts *

counters.proto

Top

AppCounters

FieldTypeLabelDescription
global_counter google.protobuf.Int32Value

Global unread counter

global_dialogs_counter google.protobuf.Int32Value

Global count of dialogs with positive counter values

unread_dialogs UnreadDialog repeated

map of chat peer id to unread to counters

UnreadDialog

Unread dialogs

FieldTypeLabelDescription
peer Peer

dialog peer

counter int32

unread messages count

UpdateCountersChanged

deprecated

FieldTypeLabelDescription
counters AppCounters

ts google.protobuf.Int64Value

crypto.proto

Top

RequestKeyExchange

Exchange public keys

FieldTypeLabelDescription
client_key google.protobuf.BytesValue

ResponseKeyExchange

FieldTypeLabelDescription
server_key google.protobuf.BytesValue

Crypto

Method NameRequest TypeResponse TypeDescription
KeyExchange RequestKeyExchange ResponseKeyExchange

Methods with HTTP bindings

Method Name Method Pattern Body
KeyExchange POST /v1/grpc/Crypto/KeyExchange *

definitions.proto

Top

DataClock

server timestamp when state was created or modified

FieldTypeLabelDescription
clock int64

DialogOptions

FieldTypeLabelDescription
log string

UUIDValue

FieldTypeLabelDescription
msb int64

lsb int64

File-level Extensions

ExtensionTypeBaseNumberDescription
dlg DialogOptions .google.protobuf.FieldOptions 100001

device_info.proto

Top

ClientInfo

Generic client info, containing information about platform type, version, sdk etc

FieldTypeLabelDescription
platform PlatformType

The platform enum. Can be either Android, Web or iOS

device_name string

For android: vendor and model; For iOS: model; For Web: platform and user agent

app_name string

Optional application name

app_version google.protobuf.StringValue

Application version

sdk_version google.protobuf.StringValue

Optional SDK version

preferred_languages string repeated

Optional ISO-639 language code and ISO-3166 country code: ru-RU

time_zone google.protobuf.StringValue

Optional TimeZone id

RequestNotifyAboutDeviceInfo

Notifying about device information

FieldTypeLabelDescription
preferred_languages string repeated

First language from this array will be used for some notifications from server *

time_zone google.protobuf.StringValue

Your timezone *

PlatformType

NameNumberDescription
PLATFORMTYPE_UNKNOWN 0

PLATFORMTYPE_ANDROID 1

PLATFORMTYPE_IOS 2

PLATFORMTYPE_WEB 3

PLATFORMTYPE_CLC 4

PLATFORMTYPE_TESTS 42

DeviceInfo

Method NameRequest TypeResponse TypeDescription
NotifyAboutDeviceInfo RequestNotifyAboutDeviceInfo ResponseVoid

Set info about current device

Methods with HTTP bindings

Method Name Method Pattern Body
NotifyAboutDeviceInfo POST /v1/grpc/DeviceInfo/NotifyAboutDeviceInfo *

event_bus.proto

Top

RequestJoinEventBus

Joining Event Bus

FieldTypeLabelDescription
id string

Bus id

timeout int64

Join TTL

RequestKeepAliveEventBus

Keep Alive Event Bus

FieldTypeLabelDescription
id string

Bus id

timeout int64

Keep TTL

RequestPostToEventBus

Event Bus Destination

FieldTypeLabelDescription
id string

Bus id

destinations int64 repeated

Destination device ids

message bytes

Message to send

ResponseJoinEventBus

FieldTypeLabelDescription
device_id int64

Generated device id for this event bus

UpdateEventBusDeviceConnected

Update about pubsub device connected

FieldTypeLabelDescription
id string

Bus id

user_id int32

Connected user id

device_id int64

Connected device id

peer Peer

Connected peer

UpdateEventBusDeviceDisconnected

Update about device disconnected

FieldTypeLabelDescription
id string

Bus id

user_id int32

device_id int64

peer Peer

UpdateEventBusDisposed

Event Bus dispose

FieldTypeLabelDescription
id string

UpdateEventBusMessage

Event Bus Message

FieldTypeLabelDescription
id string

Bus id

sender_id int32

sender_device_id int64

message bytes

EventBus

Method NameRequest TypeResponse TypeDescription
JoinEventBus RequestJoinEventBus ResponseJoinEventBus

KeepAliveEventBus RequestKeepAliveEventBus ResponseVoid

PostToEventBus RequestPostToEventBus ResponseVoid

Methods with HTTP bindings

Method Name Method Pattern Body
JoinEventBus POST /v1/grpc/EventBus/JoinEventBus *
KeepAliveEventBus POST /v1/grpc/EventBus/KeepAliveEventBus *
PostToEventBus POST /v1/grpc/EventBus/PostToEventBus *

gateway_service.proto

Top

GetDifferenceCommand

FieldTypeLabelDescription
seq google.protobuf.Int32Value

state bytes

configHash int64

ServiceUpdate

FieldTypeLabelDescription
obsoleteUpdate google.protobuf.BytesValue

groups.proto

Top

Group

Group information

FieldTypeLabelDescription
id int32

group id

space_id UUIDValue

access_hash int64

Access hash of group

title string

Title of group

avatar Avatar

Avatar of group

members_amount google.protobuf.Int32Value

Number of members

is_member google.protobuf.BoolValue

Is current user a member of a group. Default is true.

is_hidden google.protobuf.BoolValue

Is group hidden (not showing it in recent list). Default is false.

group_type GroupType

Group Type. Used only for displaying information. Default is GROUP.

can_send_message google.protobuf.BoolValue

Can user send messages. Default is equals isMember for Group and false for channels.

is_admin google.protobuf.BoolValue

Deprecated

creator_uid int32

Group creator

members Member repeated

Members of group

create_date int64

Date of creation

theme google.protobuf.StringValue

Theme of group

about google.protobuf.StringValue

About of group

shortname google.protobuf.StringValue

Group short name

base_permissions GroupAdminPermission repeated

Base permissions for invited members

GroupData

FieldTypeLabelDescription
space_id UUIDValue

title string

Title of group

avatar Avatar

Avatar of group

members_amount int32

Number of members

group_type GroupType

Group Type. Used only for displaying information. Default is GROUP.

creator_user_id int32

Group creator

created_at google.protobuf.Timestamp

Date of creation

about google.protobuf.StringValue

About of group

shortname google.protobuf.StringValue

Group short name

base_permissions GroupAdminPermission repeated

clock int64

GroupFull

Group Full information - Deprecated

FieldTypeLabelDescription
id int32

Group Id

create_date int64

Date created

owner_uid int32

Group owner

members Member repeated

Group members. Can be empty when isAsyncMembers enabled.

theme google.protobuf.StringValue

Group Theme

about google.protobuf.StringValue

Group about

is_async_members google.protobuf.BoolValue

Is Members need to be loaded asynchronous.

can_view_members google.protobuf.BoolValue

Can current user view members of the group. Default is true.

can_invite_people google.protobuf.BoolValue

Can current user invite new people. Default is true.

is_shared_history google.protobuf.BoolValue

Is history shared among all users.

GroupMemberPermission

A struct mapping a group member to their permissions

userId the id of the group member

permissions a list of permissions that user has

FieldTypeLabelDescription
user_id int32

permissions GroupAdminPermission repeated

Member

Member information

FieldTypeLabelDescription
uid int32

User id

inviter_uid int32

User inviter id

date int64

Adding date

is_admin google.protobuf.BoolValue

Deprecated

permissions GroupAdminPermission repeated

List of member permissions

RequestCreateGroup

Creating group chat

FieldTypeLabelDescription
rid int64

Id for query deduplication

space_id UUIDValue

title string

users UserOutPeer repeated

members

group_type GroupType

group or channel

username google.protobuf.StringValue

optional shortname of a group, group will be public if set

optimizations UpdateOptimization repeated

Optimizations drops some info from response to decrease traffic and latency

base_permissions GroupAdminPermission repeated

Base permissions for invited members

RequestEditGroupAbout

Edit Group About

FieldTypeLabelDescription
group_peer GroupOutPeer

rid int64

Id for query deduplication

about google.protobuf.StringValue

optimizations UpdateOptimization repeated

Optimizations drops some info from response to decrease traffic and latency

RequestEditGroupAvatar

Changing group avatar

FieldTypeLabelDescription
group_peer GroupOutPeer

rid int64

Id for query deduplication

file_location FileLocation

optimizations UpdateOptimization repeated

Optimizations drops some info from response to decrease traffic and latency

RequestEditGroupBasePermissions

FieldTypeLabelDescription
group_peer GroupOutPeer

random_id int64

Id for query deduplication

granted_permissions GroupAdminPermission repeated

revoked_permissions GroupAdminPermission repeated

RequestEditGroupTitle

Changing group title

FieldTypeLabelDescription
group_peer GroupOutPeer

rid int64

Id for query deduplication

title string

optimizations UpdateOptimization repeated

Optimizations drops some info from response to decrease traffic and latency

RequestEditGroupTopic

Edit group topic

FieldTypeLabelDescription
group_peer GroupOutPeer

rid int64

Id for query deduplication

topic google.protobuf.StringValue

optimizations UpdateOptimization repeated

Optimizations drops some info from response to decrease traffic and latency

RequestGetGroupInviteUrl

Building invite url

FieldTypeLabelDescription
group_peer GroupOutPeer

RequestGetGroupInviteUrlBase

Get group invite url base

RequestGetGroupMemberPermissions

Fetches the group administration permissions for each of the users from the list

FieldTypeLabelDescription
group_id int32

user_ids int32 repeated

RequestInviteUser

Inviting user to group

FieldTypeLabelDescription
group_peer GroupOutPeer

rid int64

Id for query deduplication

user UserOutPeer

optimizations UpdateOptimization repeated

Optimizations drops some info from response to decrease traffic and latency

RequestJoinGroup

Join group method

FieldTypeLabelDescription
token string

optimizations UpdateOptimization repeated

RequestJoinGroupByPeer

Join group by peer

FieldTypeLabelDescription
peer GroupOutPeer

RequestKickUser

Kicking user from group

FieldTypeLabelDescription
group_peer GroupOutPeer

rid int64

Id for query deduplication

user UserOutPeer

optimizations UpdateOptimization repeated

Optimizations drops some info from response to decrease traffic and latency

RequestLeaveGroup

Leaving group

FieldTypeLabelDescription
group_peer GroupOutPeer

rid int64

Id for query deduplication

optimizations UpdateOptimization repeated

Optimizations drops some info from response to decrease traffic and latency

RequestLoadFullGroups

Loading Full Groups - Deprecated

FieldTypeLabelDescription
groups GroupOutPeer repeated

RequestLoadMembers

Loading group members

FieldTypeLabelDescription
group GroupOutPeer

limit int32

next google.protobuf.BytesValue

cursor

RequestMakeUserAdmin

Make user admin

FieldTypeLabelDescription
group_peer GroupOutPeer

user_peer UserOutPeer

permissions GroupAdminPermission repeated

RequestMakeUserAdminObsolete

[OBSOLETE] Make user admin

FieldTypeLabelDescription
group_peer GroupOutPeer

user_peer UserOutPeer

RequestRemoveGroupAvatar

Removing group avatar

FieldTypeLabelDescription
group_peer GroupOutPeer

rid int64

Id for query deduplication

optimizations UpdateOptimization repeated

Optimizations drops some info from response to decrease traffic and latency

RequestRevokeInviteUrl

Revoking invite urls

FieldTypeLabelDescription
group_peer GroupOutPeer

RequestSetGroupShortname

Sets group short name

FieldTypeLabelDescription
peer GroupOutPeer

shortname string

if shortname was empty, then group will become public

RequestTransferOwnership

Transfer ownership of group

FieldTypeLabelDescription
group_peer GroupOutPeer

new_owner int32

ResponseCreateGroup

FieldTypeLabelDescription
seq int32

deprecated

state bytes

group Group

created group

users User repeated

empty if dropped by optimizations

user_peers UserOutPeer repeated

empty if dropped by optimizations

ResponseEditGroupAvatar

FieldTypeLabelDescription
avatar Avatar

seq int32

deprecated

state bytes

date int64

mid UUIDValue

ResponseGetGroupInviteUrlBase

FieldTypeLabelDescription
url string

ResponseGetGroupMemberPermissions

FieldTypeLabelDescription
permissions GroupMemberPermission repeated

ResponseInviteUrl

Response for invite url methods

FieldTypeLabelDescription
url string

ResponseJoinGroup

FieldTypeLabelDescription
group Group

users User repeated

empty if dropped by optimizations

user_peers UserOutPeer repeated

empty if dropped by optimizations

mid UUIDValue

deprecated

seq int32

deprecated

state bytes

date int64

ResponseLoadFullGroups

Deprecated

FieldTypeLabelDescription
groups GroupFull repeated

ResponseLoadMembers

FieldTypeLabelDescription
members UserOutPeer repeated

next google.protobuf.BytesValue

ResponseMakeUserAdminObsolete

FieldTypeLabelDescription
members Member repeated

seq int32

deprecated

state bytes

UpdateGroup

Update about group data changed

FieldTypeLabelDescription
id int32

data GroupData

UpdateGroupAboutChanged

Update about about changed

FieldTypeLabelDescription
group_id int32

about google.protobuf.StringValue

UpdateGroupAboutChangedObsolete

Update about group about change

FieldTypeLabelDescription
group_id int32

about google.protobuf.StringValue

UpdateGroupAvatarChanged

Update about avatar changed

FieldTypeLabelDescription
group_id int32

avatar Avatar

UpdateGroupAvatarChangedObsolete

Update about group avatar change

FieldTypeLabelDescription
group_id int32

mid UUIDValue

deprecated

uid int32

avatar Avatar

date int64

UpdateGroupBasePermissionsChanged

Update about base group permissions changed

FieldTypeLabelDescription
group_id int32

base_permissions GroupAdminPermission repeated

new base permissions

UpdateGroupCanInviteMembersChanged

Update about can invite members changed

FieldTypeLabelDescription
group_id int32

can_invite_members bool

UpdateGroupCanSendMessagesChanged

Update about can send messages changed

FieldTypeLabelDescription
group_id int32

can_send_messages bool

UpdateGroupCanViewMembersChanged

Update about can view members changed

FieldTypeLabelDescription
group_id int32

can_view_members bool

UpdateGroupHistoryShared

Update about history shared

FieldTypeLabelDescription
group_id int32

UpdateGroupInviteObsolete

Update about inviting current user to group

FieldTypeLabelDescription
group_id int32

rid int64

deprecated

mid UUIDValue

deprecated

invite_uid int32

date int64

UpdateGroupMemberAdminChanged

Update about member admin changed

FieldTypeLabelDescription
group_id int32

user_id int32

is_admin bool

UpdateGroupMemberChanged

Update about membership changed

FieldTypeLabelDescription
group_id int32

is_member bool

UpdateGroupMemberDiff

Update about members changed

FieldTypeLabelDescription
removed_users int32 repeated

added_members Member repeated

members_count int32

UpdateGroupMemberPermissionsChanged

Update about the user's permissions

FieldTypeLabelDescription
group_id int32

user_id int32

permissions GroupAdminPermission repeated

UpdateGroupMembersBecameAsync

Update about members became async

FieldTypeLabelDescription
group_id int32

UpdateGroupMembersCountChanged

Update about members count changed

FieldTypeLabelDescription
group_id int32

members_count int32

UpdateGroupMembersUpdateObsolete

Silent group members update

FieldTypeLabelDescription
group_id int32

members Member repeated

UpdateGroupMembersUpdated

Update about members updated

FieldTypeLabelDescription
group_id int32

members Member repeated

UpdateGroupOwnerChanged

Update about owner changed

FieldTypeLabelDescription
group_id int32

user_id int32

new owner

UpdateGroupShortnameChanged

Update group short name

FieldTypeLabelDescription
group_id int32

shortname string

uid int32

UpdateGroupTitleChanged

Update about title changed

FieldTypeLabelDescription
group_id int32

title string

UpdateGroupTitleChangedObsolete

Update about group title change

FieldTypeLabelDescription
group_id int32

mid UUIDValue

deprecated

uid int32

title string

date int64

UpdateGroupTopicChanged

Update about topic changed

FieldTypeLabelDescription
group_id int32

topic google.protobuf.StringValue

UpdateGroupTopicChangedObsolete

Update about group topic change

FieldTypeLabelDescription
group_id int32

rid int64

deprecated

uid int32

topic google.protobuf.StringValue

date int64

UpdateGroupUserInvitedObsolete

Update about inviting user to group

FieldTypeLabelDescription
group_id int32

rid int64

Id for deduplication

mid UUIDValue

deprecated

uid int32

inviter_uid int32

date int64

UpdateGroupUserKickObsolete

Update about kicking user

FieldTypeLabelDescription
group_id int32

mid UUIDValue

deprecated

uid int32

kicker_uid int32

date int64

UpdateGroupUserLeaveObsolete

Update about leaving user

FieldTypeLabelDescription
group_id int32

mid UUIDValue

deprecated

uid int32

date int64

GroupAdminPermission

Possible permissions on a group

NameNumberDescription
GROUPADMINPERMISSION_UNKNOWN 0

GROUPADMINPERMISSION_EDITSHORTNAME 1

GROUPADMINPERMISSION_INVITE 2

GROUPADMINPERMISSION_KICK 3

GROUPADMINPERMISSION_UPDATEINFO 4

GROUPADMINPERMISSION_SETPERMISSIONS 5

GROUPADMINPERMISSION_EDITMESSAGE 6

GROUPADMINPERMISSION_DELETEMESSAGE 7

GROUPADMINPERMISSION_GETINTEGRATIONTOKEN 8

GROUPADMINPERMISSION_SENDMESSAGE 9

GROUPADMINPERMISSION_PINMESSAGE 10

GROUPADMINPERMISSION_VIEWMEMBERS 11

GroupType

NameNumberDescription
GROUPTYPE_UNKNOWN 0

GROUPTYPE_GROUP 1

GROUPTYPE_CHANNEL 2

GROUPTYPE_THREAD 4

Groups

Method NameRequest TypeResponse TypeDescription
LoadFullGroups RequestLoadFullGroups ResponseLoadFullGroups

deprecated

LoadMembers RequestLoadMembers ResponseLoadMembers

CreateGroup RequestCreateGroup ResponseCreateGroup

EditGroupTitle RequestEditGroupTitle ResponseSeqDateMid

SetGroupShortname RequestSetGroupShortname ResponseSeq

EditGroupAvatar RequestEditGroupAvatar ResponseEditGroupAvatar

RemoveGroupAvatar RequestRemoveGroupAvatar ResponseSeqDateMid

EditGroupTopic RequestEditGroupTopic ResponseSeqDate

EditGroupAbout RequestEditGroupAbout ResponseSeqDate

EditGroupBasePermissions RequestEditGroupBasePermissions .google.protobuf.Empty

InviteUser RequestInviteUser ResponseSeqDateMid

LeaveGroup RequestLeaveGroup ResponseSeqDateMid

KickUser RequestKickUser ResponseSeqDateMid

MakeUserAdmin RequestMakeUserAdmin ResponseSeqDate

GetGroupMemberPermissions RequestGetGroupMemberPermissions ResponseGetGroupMemberPermissions

TransferOwnership RequestTransferOwnership ResponseSeqDate

GetGroupInviteUrl RequestGetGroupInviteUrl ResponseInviteUrl

GetGroupInviteUrlBase RequestGetGroupInviteUrlBase ResponseGetGroupInviteUrlBase

RevokeInviteUrl RequestRevokeInviteUrl ResponseInviteUrl

JoinGroup RequestJoinGroup ResponseJoinGroup

JoinGroupByPeer RequestJoinGroupByPeer ResponseVoid

MakeUserAdminObsolete RequestMakeUserAdminObsolete ResponseMakeUserAdminObsolete

Methods with HTTP bindings

Method Name Method Pattern Body
LoadFullGroups POST /v1/grpc/Groups/LoadFullGroups *
LoadMembers POST /v1/grpc/Groups/LoadMembers *
CreateGroup POST /v1/grpc/Groups/CreateGroup *
EditGroupTitle POST /v1/grpc/Groups/EditGroupTitle *
SetGroupShortname POST /v1/grpc/Groups/SetGroupShortname *
EditGroupAvatar POST /v1/grpc/Groups/EditGroupAvatar *
RemoveGroupAvatar POST /v1/grpc/Groups/RemoveGroupAvatar *
EditGroupTopic POST /v1/grpc/Groups/EditGroupTopic *
EditGroupAbout POST /v1/grpc/Groups/EditGroupAbout *
EditGroupBasePermissions POST /v1/grpc/Groups/EditGroupBasePermissions *
InviteUser POST /v1/grpc/Groups/InviteUser *
LeaveGroup POST /v1/grpc/Groups/LeaveGroup *
KickUser POST /v1/grpc/Groups/KickUser *
MakeUserAdmin POST /v1/grpc/Groups/MakeUserAdmin *
GetGroupMemberPermissions POST /v1/grpc/Groups/GetGroupMemberPermissions *
TransferOwnership POST /v1/grpc/Groups/TransferOwnership *
GetGroupInviteUrl POST /v1/grpc/Groups/GetGroupInviteUrl *
GetGroupInviteUrlBase POST /v1/grpc/Groups/GetGroupInviteUrlBase *
RevokeInviteUrl POST /v1/grpc/Groups/RevokeInviteUrl *
JoinGroup POST /v1/grpc/Groups/JoinGroup *
JoinGroupByPeer POST /v1/grpc/Groups/JoinGroupByPeer *
MakeUserAdminObsolete POST /v1/grpc/Groups/MakeUserAdminObsolete *

integrations.proto

Top

RequestGetIntegrationToken

Getting current group token

FieldTypeLabelDescription
group_peer OutPeer

RequestRevokeIntegrationToken

Revoke group token

FieldTypeLabelDescription
group_peer OutPeer

ResponseIntegrationToken

Group token response

FieldTypeLabelDescription
token string

url string

Integrations

Method NameRequest TypeResponse TypeDescription
GetIntegrationToken RequestGetIntegrationToken ResponseIntegrationToken

Get token for posting to group

RevokeIntegrationToken RequestRevokeIntegrationToken ResponseIntegrationToken

Revoke token

Methods with HTTP bindings

Method Name Method Pattern Body
GetIntegrationToken POST /v1/grpc/Integrations/GetIntegrationToken *
RevokeIntegrationToken POST /v1/grpc/Integrations/RevokeIntegrationToken *

media_and_files.proto

Top

AudioLocation

Audio location

FieldTypeLabelDescription
file_location FileLocation

File location

duration int32

audio duration in seconds

mime_type string

mime type

file_size int32

file size

Avatar

Avatar of User or Group

FieldTypeLabelDescription
small_image AvatarImage

Optional small image of avatar box in 100x100

large_image AvatarImage

Optional large image of avatar box in 200x200

full_image AvatarImage

Optional full screen image of avatar

AvatarImage

Avatar Image

FieldTypeLabelDescription
file_location FileLocation

Location of file

width int32

Width of avatar image

height int32

Height of avatar image

file_size int32

Size of file

Color

FieldTypeLabelDescription
rgb RgbColor

predefined PredefinedColor

FastThumb

Fast thumb of media messages. Less than 90x90 and compressed by JPEG with low quality

FieldTypeLabelDescription
w int32

Width of thumb

h int32

Height of thump

thumb bytes

compressed image data

FileLocation

Location of file on server

FieldTypeLabelDescription
file_id int64

Unique Id of file

access_hash int64

Access hash of file

FileUrlDescription

File url description

FieldTypeLabelDescription
file_id int64

File id of url

url string

Url for downloading

timeout int32

Timeout of url

unsigned_url google.protobuf.StringValue

Unsigned URL (used to honor web caches)

unsigned_url_headers HTTPHeader repeated

Headers that is required to download files with unsigned url

HTTPHeader

HTTP Header record

FieldTypeLabelDescription
key string

HTTP Header name

value string

HTTP Header value

ImageLocation

Image location

FieldTypeLabelDescription
file_location FileLocation

Location of file

width int32

Width of avatar image

height int32

Height of avatar image

file_size int32

Size of file

PredefinedColor

Predefined color

FieldTypeLabelDescription
color Colors

Predefined color value

RequestCommitFileUpload

Comminting uploaded file to storage

FieldTypeLabelDescription
upload_key bytes

file_name string

RequestGetFileUploadPartUrl

Upload file part

FieldTypeLabelDescription
part_number int32

part_size int32

upload_key bytes

RequestGetFileUploadUrl

Requesting pload url

FieldTypeLabelDescription
expected_size int32

RequestGetFileUrl

Requesting file URL for downloading

FieldTypeLabelDescription
file FileLocation

RequestGetFileUrlBuilder

Get File URL Builder that allows to build file urls from client side

FieldTypeLabelDescription
supported_signature_algorithms string repeated

RequestGetFileUrls

Requesting multiple fle URL for downloading

FieldTypeLabelDescription
files FileLocation repeated

ResponseCommitFileUpload

FieldTypeLabelDescription
uploaded_file_location FileLocation

ResponseGetFileUploadPartUrl

FieldTypeLabelDescription
url string

ResponseGetFileUploadUrl

FieldTypeLabelDescription
url string

upload_key bytes

ResponseGetFileUrl

FieldTypeLabelDescription
url string

timeout int32

unsigned_url google.protobuf.StringValue

unsigned_url_headers HTTPHeader repeated

ResponseGetFileUrlBuilder

FieldTypeLabelDescription
base_url string

algo string

seed string

signature_secret bytes

timeout int32

ResponseGetFileUrls

FieldTypeLabelDescription
file_urls FileUrlDescription repeated

RgbColor

RGB Color

FieldTypeLabelDescription
rgb int32

RGB color value

Colors

NameNumberDescription
COLORS_UNKNOWN 0

COLORS_RED 1

COLORS_YELLOW 2

COLORS_GREEN 3

MediaAndFiles

Method NameRequest TypeResponse TypeDescription
GetFileUrl RequestGetFileUrl ResponseGetFileUrl

Get link to file for downloading

GetFileUrls RequestGetFileUrls ResponseGetFileUrls

Get link to files for downloading

GetFileUrlBuilder RequestGetFileUrlBuilder ResponseGetFileUrlBuilder

Create builder for file url

GetFileUploadUrl RequestGetFileUploadUrl ResponseGetFileUploadUrl

Get url for uploading

CommitFileUpload RequestCommitFileUpload ResponseCommitFileUpload

Finish uploading a file

GetFileUploadPartUrl RequestGetFileUploadPartUrl ResponseGetFileUploadPartUrl

Get url for uploading chunk of file

Methods with HTTP bindings

Method Name Method Pattern Body
GetFileUrl POST /v1/grpc/MediaAndFiles/GetFileUrl *
GetFileUrls POST /v1/grpc/MediaAndFiles/GetFileUrls *
GetFileUrlBuilder POST /v1/grpc/MediaAndFiles/GetFileUrlBuilder *
GetFileUploadUrl POST /v1/grpc/MediaAndFiles/GetFileUploadUrl *
CommitFileUpload POST /v1/grpc/MediaAndFiles/CommitFileUpload *
GetFileUploadPartUrl POST /v1/grpc/MediaAndFiles/GetFileUploadPartUrl *

messaging.proto

Top

AudioMedia

Audio media

FieldTypeLabelDescription
audio AudioLocation

BinaryMessage

Binary Message. Useful for implementing your own content types

FieldTypeLabelDescription
content_tag string

msg bytes

DeletedMessage

Deleted message

FieldTypeLabelDescription
is_local google.protobuf.BoolValue

Deleted locally message

Dialog

Conversation from history

peer

unreadCount

sortDate date of conversation for sorting

senderUid Sender of top message (may be zero)

isFavourite Is dialog favourite

rid Random ID of top message (may be zero)

mid Message id

date Date of top message (can't be zero)

message Content of message

firstUnreadDate Date of first unread message

attributes Optional top message attributes

pinnedMessages Optional pinned messages

historyMessage Optional last messages

FieldTypeLabelDescription
peer Peer

Peer of conversation

unread_count int32

counter of unread messages

sort_date int64

deprecated

sender_uid int32

is_favourite google.protobuf.BoolValue

mid UUIDValue

Message id

date int64

last action date

message MessageContent

last message content

state MessageState

first_unread_date int64

attributes MessageAttributes

pinned_messages PinnedMessages

history_message HistoryMessage

last message in this dialog

last_receive int64

last_read int64

DialogData

Data related to dialog entity

FieldTypeLabelDescription
is_favourite bool

created_at int64

clock int64

When dialog was changed last time

DialogGroup

Grouped dialog list

FieldTypeLabelDescription
title string

key string

dialogs DialogShort repeated

DialogIndex

FieldTypeLabelDescription
peer Peer

The peer for the conversation

last_message_date int64

Last message date of a dialog

data DialogData

DialogListEntry

Compound info of a one of the dialogs in dialog list SDK 2.0

peer

unread_count count of the unread messages in dialog

my_read_date date of the last own read

last_message_date date of the last message

receive_date date of the last received message

read_date date of the last read message

entry_clock shared clock across all datas which required for making a dialog entry

data data related to dialog itself

FieldTypeLabelDescription
peer Peer

Peer of conversation

unread_count int32

my_read_date int64

last_message_date int64

receive_date int64

read_date int64

entry_clock int64

data DialogData

DialogShort

Short Dialog from grouped conversation list

FieldTypeLabelDescription
peer Peer

Peer of conversation

counter int32

Conversation unread count

date int64

Conversation top message date

DocumentEx

FieldTypeLabelDescription
photo DocumentExPhoto

video DocumentExVideo

voice DocumentExVoice

DocumentExPhoto

File photo extension

FieldTypeLabelDescription
w int32

image width

h int32

image height

DocumentExVideo

File video extension

FieldTypeLabelDescription
w int32

video width

h int32

video height

duration int32

DocumentExVoice

File voice extension

FieldTypeLabelDescription
duration int32

DocumentMessage

File message

FieldTypeLabelDescription
file_id int64

access_hash int64

file_size int32

name string

mime_type string

thumb FastThumb

optional thumb of file. JPEG less that 90x90 with 60-70 quality.

ext DocumentEx

EmptyMessage

Empty Message

HistoryMessage

Message from history

FieldTypeLabelDescription
sender_uid int32

sender_peer OutPeer

host_peer OutPeer

mid UUIDValue

Message id generated by server

prev_mid UUIDValue

date int64

message MessageContent

state MessageState

reactions MessageReaction repeated

attribute MessageAttributes

forward ReferencedMessages

reply ReferencedMessages

edited_at google.protobuf.Int64Value

random_id int64

ImageMedia

Image media

image image

FieldTypeLabelDescription
image ImageLocation

InteractiveMedia

A text message extension representing an interactive action.

Can be used to add widgets (such as buttons, selects, etc) to messages.

FieldTypeLabelDescription
id string

identifier of the media action

widget InteractiveMediaWidget

a widget to be shown to user

style InteractiveMediaStyle

a style of the widget, which is interpreted by the client

confirm InteractiveMediaConfirm

A content of the alert dialog that will be show to user when they perform the media action

InteractiveMediaButton

A 'Button' widget

FieldTypeLabelDescription
value string

A value for this button

label google.protobuf.StringValue

A user-visible description of this button

InteractiveMediaConfirm

An alert dialog content to show to user

FieldTypeLabelDescription
text google.protobuf.StringValue

the optional alert dialog prompt

title google.protobuf.StringValue

the optional alert dialog title

ok google.protobuf.StringValue

the optional confirm button text

dismiss google.protobuf.StringValue

the optional cancel button text

InteractiveMediaGroup

A group of interactive media actions

FieldTypeLabelDescription
actions InteractiveMedia repeated

the list of actions

title google.protobuf.StringValue

an optional title of the group

description google.protobuf.StringValue

an optional description of the group

translations InteractiveMediaTranslationGroup repeated

a media content translations

InteractiveMediaSelect

A select from multiple values widget

FieldTypeLabelDescription
options InteractiveMediaSelectOption repeated

list of values to present to user

label google.protobuf.StringValue

A user-visible descripton of this select

default_value google.protobuf.StringValue

A value that will be selected by default

InteractiveMediaSelectOption

A row in the select widget

FieldTypeLabelDescription
value string

id of the row

label string

a user visible text for this row

InteractiveMediaTranslation

FieldTypeLabelDescription
id string

value string

InteractiveMediaTranslationGroup

FieldTypeLabelDescription
language string

a translation group language

messages InteractiveMediaTranslation repeated

a list of translation mesages

InteractiveMediaWidget

Some interactive element inside a message

FieldTypeLabelDescription
interactiveMediaButton InteractiveMediaButton

interactiveMediaSelect InteractiveMediaSelect

JsonMessage

Custom-data JsonMessage

FieldTypeLabelDescription
raw_json string

MessageAttributes

Message Attributes

FieldTypeLabelDescription
is_mentioned google.protobuf.BoolValue

Is mentioned. If set overrides built-in value.

is_highlighted google.protobuf.BoolValue

Is message highlighted. Default is false.

is_notified google.protobuf.BoolValue

Is notified. If set overrides built-in settings.

is_only_for_you google.protobuf.BoolValue

If this message is only for you. Default is false

MessageContent

FieldTypeLabelDescription
textMessage TextMessage

serviceMessage ServiceMessage

documentMessage DocumentMessage

jsonMessage JsonMessage

unsupportedMessage UnsupportedMessage

stickerMessage StickerMessage

binaryMessage BinaryMessage

emptyMessage EmptyMessage

deletedMessage DeletedMessage

MessageMedia

Message media

FieldTypeLabelDescription
webpage WebpageMedia

image ImageMedia

audio AudioMedia

actions InteractiveMediaGroup repeated

MessageReaction

Reaction to message

FieldTypeLabelDescription
users int32 repeated

User's reaction

code string

Reaction EMOJI code

ParagraphStyle

Paragraph style

FieldTypeLabelDescription
show_paragraph google.protobuf.BoolValue

Show quote-like paragraph?

paragraph_color Color

Override paragraph color

bg_color Color

Override background color

PinnedMessages

Pinned messages

FieldTypeLabelDescription
mids UUIDValue repeated

Messages ids

QuotedMessage

Quoted Message

messageId

publicGroupId

senderUserId

messageDate

quotedMessageContent

FieldTypeLabelDescription
message_id int64

Message Id if present

public_group_id int32

Public Group id if present

sender_user_id int32

Sender of message

message_date int64

Date of message

quoted_message_content MessageContent

Optional Quoted Message Content. Can be empty if messageId is present and message is in current peer.

ReferencedMessages

mids Referenced message ids

FieldTypeLabelDescription
mids UUIDValue repeated

RequestArchiveChat

Archiving chat

FieldTypeLabelDescription
peer OutPeer

RequestClearChat

Clearing of conversation (without removing dialog from dialogs list)

FieldTypeLabelDescription
peer OutPeer

last_message_date int64

RequestDeleteChat

Deleting of conversation (also leave group for group conversations)

FieldTypeLabelDescription
peer OutPeer

last_message_date int64

RequestDeleteMessageObsolete

Deleting messages

FieldTypeLabelDescription
mids UUIDValue repeated

Message ids

RequestDialogListDifference

Loading compound difference (all dialogs after from_clock) as DialogListEntries

Use it to request difference in dialog list

FieldTypeLabelDescription
from_clock int64

Shared clock across all states which required for making a dialog entry (e.g. max clock among those dates) / Conceptually you have to set this to sync all including datas after reconnect or authorization

RequestDoInteractiveMediaAction

Sends a request to do interactive media message

FieldTypeLabelDescription
mid UUIDValue

Message id of the enclosed message

id string

Media id

value string

selected value

RequestFavouriteDialog

Marking dialog as favourite

FieldTypeLabelDescription
peer OutPeer

RequestFetchDialogIndex

Fetches dialog index (short info about all user's dialogs).

Used in client side pagination.

RequestGetLastConversationMessages

Use it to receive messages for visible dialogs after FetchDialogsIndex

FieldTypeLabelDescription
peers Peer repeated

RequestHideDialog

Hide Dialog from grouped list

FieldTypeLabelDescription
peer OutPeer

RequestLoadArchived

Loading archived messages - deprecated

FieldTypeLabelDescription
next_offset google.protobuf.BytesValue

limit int32

optimizations UpdateOptimization repeated

RequestLoadDialogs

Loading conversation history

FieldTypeLabelDescription
min_date int64

limit int32

optimizations UpdateOptimization repeated

filters DialogsFilter repeated

peers_to_load Peer repeated

RequestLoadGroupedDialogs

Load all dialogs from grouped list - deprecated

FieldTypeLabelDescription
optimizations UpdateOptimization repeated

RequestLoadHistory

Loading history of chat

FieldTypeLabelDescription
peer OutPeer

date int64

load_mode ListLoadMode

forward, backward or both

limit int32

optimizations UpdateOptimization repeated

RequestMessageRead

Marking plain messages as read

FieldTypeLabelDescription
peer OutPeer

date int64

RequestMessageReceived

Confirmation of plain message receive by device

FieldTypeLabelDescription
peer OutPeer

date int64

RequestMessageRemoveReaction

Removing Message reaction

FieldTypeLabelDescription
peer OutPeer

mid UUIDValue

Message id

code string

EMOJI code

RequestMessageSetReaction

Setting Message reaction

FieldTypeLabelDescription
peer OutPeer

mid UUIDValue

Message id

code string

EMOJI code

RequestNotifyDialogOpened

Notifying about dialog open

FieldTypeLabelDescription
peer OutPeer

RequestPinMessage

Pin message in conversation

FieldTypeLabelDescription
peer OutPeer

mid UUIDValue

Message id

last_pin_date int64

RequestSendMessage

Sending plain message

FieldTypeLabelDescription
peer OutPeer

deduplication_id int64

Id for message deduplication

message MessageContent

is_only_for_user int32

if not empty, then message will be send to this user only

forward ReferencedMessages

If current message forwards some other

reply ReferencedMessages

If current message is a reply on some other

predicates SearchPredicate repeated

white_list int32 repeated

black_list int32 repeated

RequestShowDialog

Show Dialog in grouped list

FieldTypeLabelDescription
peer OutPeer

RequestUnfavouriteDialog

Making dialog as unfavourite

FieldTypeLabelDescription
peer OutPeer

RequestUnpinMessage

Unpin message in conversation

FieldTypeLabelDescription
peer OutPeer

mid UUIDValue

Message id

last_pin_date int64

RequestUpdateMessage

Changing Message content

FieldTypeLabelDescription
mid UUIDValue

Message id

updated_message MessageContent

last_edited_at int64

Date from this message when it was changed last time

ResponseDialogListDifference

Contains dialogs that was change after from_clock

FieldTypeLabelDescription
entries DialogListEntry repeated

clock int64

Start and the end of the compound history data interval

prev_clock int64

ResponseDialogsOrder

Dialogs order response - deprecated

FieldTypeLabelDescription
seq int32

state bytes

groups DialogGroup repeated

ResponseFetchDialogIndex

FieldTypeLabelDescription
dialog_indices DialogIndex repeated

ResponseGetLastConversationMessages

FieldTypeLabelDescription
messages ResponseGetLastConversationMessages.Pair repeated

ResponseGetLastConversationMessages.Pair

FieldTypeLabelDescription
peer Peer

message HistoryMessage

ResponseLoadArchived

deprecated

FieldTypeLabelDescription
groups Group repeated

users User repeated

dialogs Dialog repeated

user_peers UserOutPeer repeated

group_peers GroupOutPeer repeated

next_offset google.protobuf.BytesValue

ResponseLoadDialogs

Contains dialogs and related peers and entities

FieldTypeLabelDescription
groups Group repeated

users User repeated

dialogs Dialog repeated

user_peers UserOutPeer repeated

group_peers GroupOutPeer repeated

ResponseLoadGroupedDialogs

deprecated

FieldTypeLabelDescription
dialogs DialogGroup repeated

users User repeated

groups Group repeated

show_archived google.protobuf.BoolValue

show_invite google.protobuf.BoolValue

user_peers UserOutPeer repeated

group_peers GroupOutPeer repeated

ResponseLoadHistory

FieldTypeLabelDescription
history HistoryMessage repeated

users User repeated

user_peers UserOutPeer repeated

groups Group repeated

group_peers GroupOutPeer repeated

counter google.protobuf.Int32Value

counter of unread messages

counter_date int64

date, related to this unread counter

ResponseReactionsResponse

Response for reactions change

FieldTypeLabelDescription
seq int32

deprecated

state bytes

reactions MessageReaction repeated

ResponseSendMessage

FieldTypeLabelDescription
message_id UUIDValue

Message id

message_date int64

Message creation date from server

previous_message_id UUIDValue

Previous message id

creator_user_id int64

Message creator

clock int64

Clock of this message (initially equals the message_date field)

SearchPredicate

Predicate for searching in custom profile

FieldTypeLabelDescription
key string

values string repeated

ServiceEx

FieldTypeLabelDescription
userInvited ServiceExUserInvited

userJoined ServiceExUserJoined

userKicked ServiceExUserKicked

userLeft ServiceExUserLeft

groupCreated ServiceExGroupCreated

changedTitle ServiceExChangedTitle

changedTopic ServiceExChangedTopic

changedAbout ServiceExChangedAbout

changedAvatar ServiceExChangedAvatar

contactRegistered ServiceExContactRegistered

phoneMissed ServiceExPhoneMissed

phoneCall ServiceExPhoneCall

phoneRejected ServiceExPhoneRejected

chatArchived ServiceExChatArchived

chatRestored ServiceExChatRestored

ServiceExChangedAbout

Service message on group about change

FieldTypeLabelDescription
about google.protobuf.StringValue

New group about

ServiceExChangedAvatar

Service message about avatar change

FieldTypeLabelDescription
avatar Avatar

Updated avatar

ServiceExChangedTitle

Service message about group title change

FieldTypeLabelDescription
title string

New group title

ServiceExChangedTopic

Service message on group topic change

FieldTypeLabelDescription
topic google.protobuf.StringValue

New group topic

ServiceExChatArchived

Message about chat archived

ServiceExChatRestored

Message about chat restored

ServiceExContactRegistered

Service message about user registration

FieldTypeLabelDescription
uid int32

User Id

ServiceExGroupCreated

Service message about group creating

ServiceExPhoneCall

Update about phone call

FieldTypeLabelDescription
duration int32

Duration of a phone call

ServiceExPhoneMissed

Update about missing phone call

ServiceExPhoneRejected

Update about phone call rejected

ServiceExUserInvited

Service message about adding user to group

FieldTypeLabelDescription
invited_uid int32

added user id

ServiceExUserJoined

Service message about user join to group

ServiceExUserKicked

Service message about kicking user from group

FieldTypeLabelDescription
kicked_uid int32

ServiceExUserLeft

Service message about user left group

ServiceMessage

Service message

FieldTypeLabelDescription
text string

ext ServiceEx

StickerMessage

Sticker message

FieldTypeLabelDescription
sticker_id google.protobuf.Int32Value

Optional Unique ID of sticker

fast_preview google.protobuf.BytesValue

Optional Fast preview of sticker in webp format

image_512 ImageLocation

Optional 512x512 sticker image in webp format

image_256 ImageLocation

Optional 256x256 sticker image in webp format

sticker_collection_id google.protobuf.Int32Value

Optional Collection ID

sticker_collection_access_hash google.protobuf.Int64Value

Optional Collection Access Hash

emoji google.protobuf.StringValue

Sticker emoji

TextCommand

Text Command Message for bots

FieldTypeLabelDescription
command string

Slash-Command For execution

args string

TextExMarkdown

Markdown extension

FieldTypeLabelDescription
markdown string

Markdown text

TextMessage

Text message

FieldTypeLabelDescription
text string

mentions int32 repeated

User mentions in message

ext TextMessageEx

Optional bytes of extension

media MessageMedia repeated

extensions Any repeated

TextMessageEx

FieldTypeLabelDescription
textExMarkdown TextExMarkdown

textModernMessage TextModernMessage

textCommand TextCommand

TextModernAttach

Attaches to message

FieldTypeLabelDescription
title google.protobuf.StringValue

title_url google.protobuf.StringValue

title_icon ImageLocation

text google.protobuf.StringValue

style ParagraphStyle

fields TextModernField repeated

TextModernField

Modern message fields

FieldTypeLabelDescription
title string

value string

is_short google.protobuf.BoolValue

Is field can be shown in compact way (default is TRUE)

TextModernMessage

Modern text message

FieldTypeLabelDescription
text google.protobuf.StringValue

sender_name_override google.protobuf.StringValue

sender_photo_override Avatar

style ParagraphStyle

attaches TextModernAttach repeated

UnsupportedMessage

Explicit type for unsupported message

UpdateChatArchive

Update about chat archive

FieldTypeLabelDescription
peer Peer

UpdateChatClear

Update about chat clear

FieldTypeLabelDescription
peer Peer

action_date int64

UpdateChatDelete

Update about chat delete

FieldTypeLabelDescription
peer Peer

action_date int64

UpdateChatGroupsChanged

Update about chat groups changed. Called only when adding, removing and reordering of grouped dialog.

FieldTypeLabelDescription
dialogs DialogGroup repeated

UpdateDialogFavouriteChanged

Update about dialog favourite changed

FieldTypeLabelDescription
peer Peer

is_favourite google.protobuf.BoolValue

UpdateInteractiveMediaEvent

The update which will be received when the action is performed. Duplicated on all clients.

FieldTypeLabelDescription
mid UUIDValue

Message id of the message that contains interactive media

id string

identifier of the media action

value string

selected value of that action

uid int32

who interacted with that media

UpdateMessage

Update about plain message

FieldTypeLabelDescription
peer Peer

sender_uid int32

date int64

message creation date

mid UUIDValue

Message id

message MessageContent

attributes MessageAttributes

attributes to help reasoning about message

forward ReferencedMessages

reply ReferencedMessages

previous_mid UUIDValue

Message id of previos message from current conversation

counter google.protobuf.Int32Value

counter of the unread messages

my_read_date google.protobuf.Int64Value

date of my own read

random_id int64

UpdateMessageContentChanged

Update about message change

FieldTypeLabelDescription
peer Peer

mid UUIDValue

Message id

message MessageContent

edited_at int64

UpdateMessageDelete

Update about message delete

FieldTypeLabelDescription
peer Peer

mids UUIDValue repeated

Deleted messages

counter google.protobuf.Int32Value

counter of unread messages

action_date int64

date? related for this unread counter

UpdateMessageEditRejectedByHook

Update about rejection of message update request

FieldTypeLabelDescription
peer Peer

mid UUIDValue

related message id

date int64

hookId string

reason google.protobuf.StringValue

UpdateMessageRead

Update about message read

FieldTypeLabelDescription
peer Peer

start_date int64

when message was read

read_date int64

deprecated

UpdateMessageReadByMe

Update about message read by me

FieldTypeLabelDescription
peer Peer

start_date int64

when message was read

unread_counter google.protobuf.Int32Value

counter of unread messages

UpdateMessageReceived

Update about message received

FieldTypeLabelDescription
peer Peer

start_date int64

when message was receive

received_date int64

deprecated

UpdateMessageRejectedByHook

Update about rejection of message send request

FieldTypeLabelDescription
peer Peer

rid int64

date int64

hookId string

reason google.protobuf.StringValue

UpdateMessageSent

Update about message sent

FieldTypeLabelDescription
peer Peer

rid int64

date int64

mid UUIDValue

Message id

prev_mid UUIDValue

Previous message id in current conversation

unread_counter google.protobuf.Int32Value

counter of unread messages

myReadDate google.protobuf.Int64Value

UpdatePinnedMessagesChanged

Update about pinned messages changed in conversation

FieldTypeLabelDescription
peer Peer

pinned_messages PinnedMessages

action_date int64

UpdateReactionsUpdate

Update about reactions change

FieldTypeLabelDescription
peer Peer

mid UUIDValue

related message id

reactions MessageReaction repeated

UpdateThreadCreated

Update about new thread inside group

FieldTypeLabelDescription
peer GroupOutPeer

peer representing thread

start_message UUIDValue

messageId from parent group where thread starts

UpdateThreadLifted

Update about thread converted to group

FieldTypeLabelDescription
peer GroupOutPeer

WebpageMedia

Webpage media

FieldTypeLabelDescription
url google.protobuf.StringValue

title google.protobuf.StringValue

description google.protobuf.StringValue

image ImageLocation

DialogsFilter

NameNumberDescription
DIALOGSFILTER_UNKNOWN 0

DIALOGSFILTER_EXCLUDEFAVOURITES 1

DIALOGSFILTER_EXCLUDEARCHIVED 2

InteractiveMediaStyle

NameNumberDescription
INTERACTIVEMEDIASTYLE_UNKNOWN 0

INTERACTIVEMEDIASTYLE_DEFAULT 1

INTERACTIVEMEDIASTYLE_PRIMARY 2

INTERACTIVEMEDIASTYLE_DANGER 3

ListLoadMode

NameNumberDescription
LISTLOADMODE_UNKNOWN 0

LISTLOADMODE_FORWARD 1

LISTLOADMODE_BACKWARD 2

LISTLOADMODE_BOTH 3

MessageState

NameNumberDescription
MESSAGESTATE_UNKNOWN 0

MESSAGESTATE_SENT 1

MESSAGESTATE_RECEIVED 2

MESSAGESTATE_READ 3

Messaging

Method NameRequest TypeResponse TypeDescription
DoInteractiveMediaAction RequestDoInteractiveMediaAction ResponseVoid

Interact with a message media (click on button for example)

SendMessage RequestSendMessage ResponseSendMessage

UpdateMessage RequestUpdateMessage ResponseSeqDate

MessageReceived RequestMessageReceived ResponseVoid

Mark message as received by self

MessageRead RequestMessageRead ResponseVoid

Mark message as read by self

DeleteMessageObsolete RequestDeleteMessageObsolete ResponseSeq

deprecated

ClearChat RequestClearChat ResponseSeq

Clear chat history

DeleteChat RequestDeleteChat ResponseSeq

ArchiveChat RequestArchiveChat ResponseSeq

deprecated

MessageSetReaction RequestMessageSetReaction ResponseReactionsResponse

Add reaction on message (emoji)

MessageRemoveReaction RequestMessageRemoveReaction ResponseReactionsResponse

LoadHistory RequestLoadHistory ResponseLoadHistory

Load conversation history

LoadDialogs RequestLoadDialogs ResponseLoadDialogs

Load user's dialogs

FetchDialogIndex RequestFetchDialogIndex ResponseFetchDialogIndex

Load short info about all user's dialogs

DialogListDifference RequestDialogListDifference ResponseDialogListDifference

Load dialogs by peers

GetLastConversationMessages RequestGetLastConversationMessages ResponseGetLastConversationMessages

Load last messages of the given conversations

LoadArchived RequestLoadArchived ResponseLoadArchived

deprecated

LoadGroupedDialogs RequestLoadGroupedDialogs ResponseLoadGroupedDialogs

deprecated

HideDialog RequestHideDialog ResponseDialogsOrder

deprecated

ShowDialog RequestShowDialog ResponseDialogsOrder

deprecated

FavouriteDialog RequestFavouriteDialog ResponseDialogsOrder

UnfavouriteDialog RequestUnfavouriteDialog ResponseDialogsOrder

NotifyDialogOpened RequestNotifyDialogOpened ResponseVoid

PinMessage RequestPinMessage ResponseSeqDate

UnpinMessage RequestUnpinMessage ResponseSeqDate

Methods with HTTP bindings

Method Name Method Pattern Body
DoInteractiveMediaAction POST /v1/grpc/Messaging/DoInteractiveMediaAction *
SendMessage POST /v1/grpc/Messaging/SendMessage *
UpdateMessage POST /v1/grpc/Messaging/UpdateMessage *
MessageReceived POST /v1/grpc/Messaging/MessageReceived *
MessageRead POST /v1/grpc/Messaging/MessageRead *
DeleteMessageObsolete POST /v1/grpc/Messaging/DeleteMessageObsolete *
ClearChat POST /v1/grpc/Messaging/ClearChat *
DeleteChat POST /v1/grpc/Messaging/DeleteChat *
ArchiveChat POST /v1/grpc/Messaging/ArchiveChat *
MessageSetReaction POST /v1/grpc/Messaging/MessageSetReaction *
MessageRemoveReaction POST /v1/grpc/Messaging/MessageRemoveReaction *
LoadHistory POST /v1/grpc/Messaging/LoadHistory *
LoadDialogs POST /v1/grpc/Messaging/LoadDialogs *
FetchDialogIndex POST /v1/grpc/Messaging/FetchDialogIndex *
DialogListDifference POST /v1/grpc/Messaging/DialogListDifference *
GetLastConversationMessages POST /v1/grpc/Messaging/GetLastConversationMessages *
LoadArchived POST /v1/grpc/Messaging/LoadArchived *
LoadGroupedDialogs POST /v1/grpc/Messaging/LoadGroupedDialogs *
HideDialog POST /v1/grpc/Messaging/HideDialog *
ShowDialog POST /v1/grpc/Messaging/ShowDialog *
FavouriteDialog POST /v1/grpc/Messaging/FavouriteDialog *
UnfavouriteDialog POST /v1/grpc/Messaging/UnfavouriteDialog *
NotifyDialogOpened POST /v1/grpc/Messaging/NotifyDialogOpened *
PinMessage POST /v1/grpc/Messaging/PinMessage *
UnpinMessage POST /v1/grpc/Messaging/UnpinMessage *

miscellaneous.proto

Top

Any

Any

typeUrl type url

data data

FieldTypeLabelDescription
type_url string

data bytes

CallsConfig

Calls configuration

callsEnabled If true then client should enable calls

videoCallsEnabled If true then client should enable video calls

groupCallsEnabled If true then client should enable group calls

groupCallsMaxMembers Determines how many members may participate in call

rtcpMuxPolicy The RTCP mux policy to use when gathering ICE candidates

emojiSecurityEnabled If true then client should send and render emoji security

screenSharingEnabled If true then client should enable screen sharing

FieldTypeLabelDescription
calls_enabled google.protobuf.BoolValue

video_calls_enabled google.protobuf.BoolValue

group_calls_enabled google.protobuf.BoolValue

group_calls_max_members google.protobuf.Int32Value

rtcp_mux_policy RtcpMuxPolicy

emoji_security_enabled google.protobuf.BoolValue

screen_sharing_enabled google.protobuf.BoolValue

Config

Configuration of system

maxGroupSize Current maximum group size

discover Discover configuration

shareEndpoint Share endpoint

callsConfig Calls configuration

groupInviteConfig Group invite configuration

serverMetaInfo Server meta information (version, etc.)

customProfileSchema Custom profile JSON Schema

servicePeers Service peers supported interpreted by the client

FieldTypeLabelDescription
max_group_size int32

discover Discover

share_endpoint google.protobuf.StringValue

calls_config CallsConfig

group_invite_config InvitesConfig

server_meta_info ServerMetaInfo

custom_profile_schema string

service_peers ServicePeers

extensions Any repeated

client_keep_alive int64

supported_methods SupportedServerMethodsType repeated

Discover

Discover description

peers peers

FieldTypeLabelDescription
peers OutPeer repeated

Extension

Extention

id Extension id

data Extension data

FieldTypeLabelDescription
id int32

data bytes

InvitesConfig

Group invites configuration

baseUrl Base URL part

groupInviteUrlPrefix Prefix for private group invite detection

resolveUrlPrefix Prefix for public groups and users link detection

shareInviteUrl Independent URL for external app sharing

FieldTypeLabelDescription
base_url google.protobuf.StringValue

group_invite_url_prefix google.protobuf.StringValue

resolve_url_prefix google.protobuf.StringValue

share_invite_url google.protobuf.StringValue

RecursiveMapValue

FieldTypeLabelDescription
items RecursiveMapValue.Item repeated

RecursiveMapValue.Array

FieldTypeLabelDescription
values RecursiveMapValue.Value repeated

RecursiveMapValue.Item

FieldTypeLabelDescription
key string

value RecursiveMapValue.Value

RecursiveMapValue.Value

FieldTypeLabelDescription
d google.protobuf.DoubleValue

i32 google.protobuf.Int32Value

i64 google.protobuf.Int64Value

str google.protobuf.StringValue

rec RecursiveMapValue

array_rec RecursiveMapValue.Array

ResponseBool

Boolean response

FieldTypeLabelDescription
value bool

ResponseSeq

Sequence response. Methods that return this value must process response in particular order

FieldTypeLabelDescription
seq int32

state bytes

date int64

ResponseSeqDate

Sequence response with date. Methods that return this value must process response in particular order

FieldTypeLabelDescription
seq int32

state bytes

date int64

mid UUIDValue

ResponseSeqDateMid

Response with seq, date and messageId

FieldTypeLabelDescription
seq int32

state bytes

date int64

mid UUIDValue

ResponseVoid

Empty response

ServerMetaInfo

Some info about the servr

releaseDate Server release date in milliseconds

apiVersion Server api version

FieldTypeLabelDescription
release_date int64

api_version google.protobuf.Int64Value

ServicePeers

Service peers

FieldTypeLabelDescription
security OutPeer

support OutPeer

stash OutPeer

UpdateConfig

Update about config change

FieldTypeLabelDescription
config Config

config_hash google.protobuf.Int64Value

RtcpMuxPolicy

NameNumberDescription
RTCPMUXPOLICY_UNKNOWN 0

RTCPMUXPOLICY_NEGOTIATE 1

RTCPMUXPOLICY_REQUIRE 2

SupportedServerMethodsType

NameNumberDescription
NONE_SUPPORTED_METHODS 0

CHANGE_PASSWORD 1

UpdateOptimization

NameNumberDescription
UPDATEOPTIMIZATION_UNKNOWN 0

UPDATEOPTIMIZATION_NONE 1

UPDATEOPTIMIZATION_STRIP_ENTITIES 2

UPDATEOPTIMIZATION_ENABLE_COMBINED 3

UPDATEOPTIMIZATION_FASTER_MESSAGES 4

UPDATEOPTIMIZATION_STRIP_COUNTERS 5

UPDATEOPTIMIZATION_COMPACT_USERS 6

UPDATEOPTIMIZATION_GROUPS_V2 7

UPDATEOPTIMIZATION_STRIP_ENTITIES_V2 8

obsolete.proto

Top

ObsoleteGetDifferenceCommand

FieldTypeLabelDescription
seq google.protobuf.Int32Value

state bytes

configHash int64

ObsoleteOutPeer

FieldTypeLabelDescription
peer ObsoletePeer

accessHash int64

ObsoletePeer

FieldTypeLabelDescription
type ObsoletePeer.ObsoletePeerType

id int32

strId google.protobuf.StringValue

access_hash int64

ObsoletePeersList

FieldTypeLabelDescription
peers ObsoletePeer repeated

ObsoleteSeqUpdateBox

FieldTypeLabelDescription
seq int32

state bytes

obsoleteUpdate google.protobuf.BytesValue

ObsoleteServiceUpdate

FieldTypeLabelDescription
obsoleteUpdate google.protobuf.BytesValue

ObsoleteWeakUpdateBox

FieldTypeLabelDescription
date int64

typing ObsoleteWeakUpdateBox.ObsoleteUpdateTyping

userLastSeen ObsoleteWeakUpdateBox.ObsoleteUpdateUserLastSeen

groupOnline ObsoleteWeakUpdateBox.ObsoleteUpdateGroupOnline

busMessage ObsoleteWeakUpdateBox.ObsoleteUpdateEventBusMessage

busDeviceConnected ObsoleteWeakUpdateBox.ObsoleteUpdateEventBusDeviceConnected

busDeviceDisconnected ObsoleteWeakUpdateBox.ObsoleteUpdateEventBusDeviceDisconnected

busDisposed ObsoleteWeakUpdateBox.ObsoleteUpdateEventBusDisposed

forceReload ObsoleteWeakUpdateBox.ObsoleteUpdateForceReloadState

incomingCall ObsoleteWeakUpdateBox.ObsoleteUpdateIncomingCall

callHandled ObsoleteWeakUpdateBox.ObsoleteUpdateCallHandled

callDisposed ObsoleteWeakUpdateBox.ObsoleteUpdateCallDisposed

update_any UpdateSeqUpdate

ObsoleteWeakUpdateBox.ObsoleteUpdateCallDisposed

FieldTypeLabelDescription
callId int64

attemptIndex google.protobuf.Int32Value

reason ObsoleteWeakUpdateBox.ObsoleteUpdateCallDisposed.ObsoleteDisposalReason

ObsoleteWeakUpdateBox.ObsoleteUpdateCallHandled

FieldTypeLabelDescription
callId int64

attemptIndex google.protobuf.Int32Value

ObsoleteWeakUpdateBox.ObsoleteUpdateEventBusDeviceConnected

FieldTypeLabelDescription
busId string

userId google.protobuf.Int32Value

deviceId int64

ObsoleteWeakUpdateBox.ObsoleteUpdateEventBusDeviceDisconnected

FieldTypeLabelDescription
busId string

userId google.protobuf.Int32Value

deviceId int64

ObsoleteWeakUpdateBox.ObsoleteUpdateEventBusDisposed

FieldTypeLabelDescription
busId string

ObsoleteWeakUpdateBox.ObsoleteUpdateEventBusMessage

FieldTypeLabelDescription
busId string

senderId google.protobuf.Int32Value

senderDeviceId google.protobuf.Int64Value

message bytes

ObsoleteWeakUpdateBox.ObsoleteUpdateForceReloadState

FieldTypeLabelDescription
fields ObsoleteWeakUpdateBox.ObsoleteUpdateForceReloadState.ObsoleteForceReloadField repeated

ObsoleteWeakUpdateBox.ObsoleteUpdateForceReloadState.ObsoleteForceReloadField

FieldTypeLabelDescription
reloadDialogs google.protobuf.Empty

reloadContacts google.protobuf.Empty

reloadHistory ObsoletePeersList

ObsoleteWeakUpdateBox.ObsoleteUpdateGroupOnline

FieldTypeLabelDescription
groupId int32

count int32

clock int64

ObsoleteWeakUpdateBox.ObsoleteUpdateIncomingCall

FieldTypeLabelDescription
callId int64

busId string

peer ObsoletePeer

displayName google.protobuf.StringValue

attemptIndex google.protobuf.Int32Value

outPeer ObsoleteOutPeer

ObsoleteWeakUpdateBox.ObsoleteUpdateTyping

FieldTypeLabelDescription
peer ObsoletePeer

userId int32

type ObsoleteTypingType

isTyping bool

ObsoleteWeakUpdateBox.ObsoleteUpdateUserLastSeen

FieldTypeLabelDescription
userId int32

epochMillis int64

deviceType int32

deviceCategory string

isOnline bool

ObsoleteWeakUpdateCommand

FieldTypeLabelDescription
subscribeToOnlines ObsoletePeersList

unsubscribeFromOnlines ObsoletePeersList

dropOnlineSubscriptions google.protobuf.Empty

myTyping ObsoleteWeakUpdateCommand.ObsoleteMyTyping

subscribeToTypings ObsoletePeersList

unsubscribeFromTypings ObsoletePeersList

dropTypingSubscriptions google.protobuf.Empty

subscribeToEventBusUpdates google.protobuf.Empty

myOnline ObsoleteWeakUpdateCommand.ObsoleteMyOnline

ObsoleteWeakUpdateCommand.ObsoleteMyOnline

FieldTypeLabelDescription
online bool

ObsoleteWeakUpdateCommand.ObsoleteMyTyping

FieldTypeLabelDescription
peer ObsoletePeer

type ObsoleteTypingType

start bool

ObsoletePeer.ObsoletePeerType

NameNumberDescription
OBSOLETE_PEERTYPE_UNKNOWN 0

OBSOLETE_PEERTYPE_PRIVATE 1

OBSOLETE_PEERTYPE_GROUP 2

OBSOLETE_PEERTYPE_SIP 4

PEERTYPE_ENCRYPTED_PRIVATE = 3;

ObsoleteTypingType

NameNumberDescription
OBSOLETE_TYPINGTYPE_UNKNOWN 0

OBSOLETE_TYPINGTYPE_TEXT 1

ObsoleteWeakUpdateBox.ObsoleteUpdateCallDisposed.ObsoleteDisposalReason

NameNumberDescription
OBSOLETE_DISPOSAL_REASON_UNKNOWN 0

OBSOLETE_DISPOSAL_REASON_REJECTED 1

OBSOLETE_DISPOSAL_REASON_BUSY 2

OBSOLETE_DISPOSAL_REASON_ENDED 3

OBSOLETE_DISPOSAL_REASON_ANSWER_TIMEOUT 4

Obsolete

deprecated

Method NameRequest TypeResponse TypeDescription
Obsolete .google.protobuf.BytesValue .google.protobuf.BytesValue

SeqUpdates .google.protobuf.Empty ObsoleteSeqUpdateBox stream

WeakUpdates ObsoleteWeakUpdateCommand stream ObsoleteWeakUpdateBox stream

Methods with HTTP bindings

Method Name Method Pattern Body
Obsolete POST /v1/grpc/Obsolete/Obsolete *
SeqUpdates POST /v1/grpc/Obsolete/SeqUpdates *
WeakUpdates POST /v1/grpc/Obsolete/WeakUpdates *

peers.proto

Top

GroupOutPeer

Group's out peer

FieldTypeLabelDescription
group_id int32

access_hash int64

OutPeer

Out peer with access hash

FieldTypeLabelDescription
type PeerType

id int32

access_hash int64

str_id google.protobuf.StringValue

Peer

Peer

FieldTypeLabelDescription
type PeerType

id int32

str_id google.protobuf.StringValue

UserOutPeer

User's out peer

FieldTypeLabelDescription
uid int32

User's id

access_hash int64

PeerType

NameNumberDescription
PEERTYPE_UNKNOWN 0

PEERTYPE_PRIVATE 1

PEERTYPE_GROUP 2

PEERTYPE_ENCRYPTEDPRIVATE 3

PEERTYPE_SIP 4

privacy.proto

Top

RequestBlockUser

Block User

FieldTypeLabelDescription
peer UserOutPeer

RequestLoadBlockedUsers

Load Blocked Users

RequestUnblockUser

Unblock User

FieldTypeLabelDescription
peer UserOutPeer

ResponseLoadBlockedUsers

FieldTypeLabelDescription
user_peers UserOutPeer repeated

UpdateUserBlocked

Update about User Blocked

FieldTypeLabelDescription
uid int32

UpdateUserUnblocked

Update about User Unblocked

FieldTypeLabelDescription
uid int32

Privacy

Method NameRequest TypeResponse TypeDescription
BlockUser RequestBlockUser ResponseSeq

UnblockUser RequestUnblockUser ResponseSeq

LoadBlockedUsers RequestLoadBlockedUsers ResponseLoadBlockedUsers

Methods with HTTP bindings

Method Name Method Pattern Body
BlockUser POST /v1/grpc/Privacy/BlockUser *
UnblockUser POST /v1/grpc/Privacy/UnblockUser *
LoadBlockedUsers POST /v1/grpc/Privacy/LoadBlockedUsers *

profile.proto

Top

RequestChangeUserStatus

Changing user's status

FieldTypeLabelDescription
status UserStatus

RequestCheckNickName

Checking availability of nickname

FieldTypeLabelDescription
nickname string

RequestEditAbout

Changing about information

FieldTypeLabelDescription
about google.protobuf.StringValue

RequestEditAvatar

Changing account's avatar

FieldTypeLabelDescription
file_location FileLocation

RequestEditCustomProfile

Chaning user custom profile based on scheme

FieldTypeLabelDescription
custom_profile string

RequestEditMyPreferredLanguages

Changing preffered languages

FieldTypeLabelDescription
preferred_languages string repeated

RequestEditMyTimeZone

Updating user's time zone

FieldTypeLabelDescription
tz string

RequestEditName

Changing account's name

FieldTypeLabelDescription
name string

RequestEditNickName

Changing account's nickname

FieldTypeLabelDescription
nickname google.protobuf.StringValue

RequestEditSex

Changing user's sex

FieldTypeLabelDescription
sex Sex

RequestRemoveAvatar

Removing account's avatar

ResponseEditAvatar

FieldTypeLabelDescription
avatar Avatar

seq int32

state bytes

Profile

Method NameRequest TypeResponse TypeDescription
EditName RequestEditName ResponseSeq

EditNickName RequestEditNickName ResponseSeq

CheckNickName RequestCheckNickName ResponseBool

EditAbout RequestEditAbout ResponseSeq

EditAvatar RequestEditAvatar ResponseEditAvatar

RemoveAvatar RequestRemoveAvatar ResponseSeq

EditMyTimeZone RequestEditMyTimeZone ResponseSeq

EditMyPreferredLanguages RequestEditMyPreferredLanguages ResponseSeq

EditSex RequestEditSex ResponseSeq

EditCustomProfile RequestEditCustomProfile ResponseSeq

ChangeUserStatus RequestChangeUserStatus ResponseSeq

Methods with HTTP bindings

Method Name Method Pattern Body
EditName POST /v1/grpc/Profile/EditName *
EditNickName POST /v1/grpc/Profile/EditNickName *
CheckNickName POST /v1/grpc/Profile/CheckNickName *
EditAbout POST /v1/grpc/Profile/EditAbout *
EditAvatar POST /v1/grpc/Profile/EditAvatar *
RemoveAvatar POST /v1/grpc/Profile/RemoveAvatar *
EditMyTimeZone POST /v1/grpc/Profile/EditMyTimeZone *
EditMyPreferredLanguages POST /v1/grpc/Profile/EditMyPreferredLanguages *
EditSex POST /v1/grpc/Profile/EditSex *
EditCustomProfile POST /v1/grpc/Profile/EditCustomProfile *
ChangeUserStatus POST /v1/grpc/Profile/ChangeUserStatus *

push.proto

Top

RequestRegisterApplePush

Registering apple push on server

FieldTypeLabelDescription
apns_key int32

token string

apns_string_key string

RequestRegisterApplePushKit

Registration of a new Apple's PushKit tokens

FieldTypeLabelDescription
apns_key int32

token string

apns_string_key string

RequestRegisterApplePushToken

Registering Apple Push Token

FieldTypeLabelDescription
bundle_id string

token string

RequestRegisterGooglePush

Registering push token on server

FieldTypeLabelDescription
project_id int64

token string

RequestUnregisterApplePush

Unregistering Apple Push

FieldTypeLabelDescription
token string

RequestUnregisterApplePushKit

Unregistering Apple Push Kit token

FieldTypeLabelDescription
token string

RequestUnregisterApplePushToken

Unregister Apple Push token

FieldTypeLabelDescription
token string

RequestUnregisterGooglePush

Unregistering Google Push

FieldTypeLabelDescription
token string

Push

Method NameRequest TypeResponse TypeDescription
RegisterGooglePush RequestRegisterGooglePush ResponseVoid

UnregisterGooglePush RequestUnregisterGooglePush ResponseVoid

RegisterApplePush RequestRegisterApplePush ResponseVoid

UnregisterApplePush RequestUnregisterApplePush ResponseVoid

RegisterApplePushKit RequestRegisterApplePushKit ResponseVoid

UnregisterApplePushKit RequestUnregisterApplePushKit ResponseVoid

RegisterApplePushToken RequestRegisterApplePushToken ResponseVoid

UnregisterApplePushToken RequestUnregisterApplePushToken ResponseVoid

Methods with HTTP bindings

Method Name Method Pattern Body
RegisterGooglePush POST /v1/grpc/Push/RegisterGooglePush *
UnregisterGooglePush POST /v1/grpc/Push/UnregisterGooglePush *
RegisterApplePush POST /v1/grpc/Push/RegisterApplePush *
UnregisterApplePush POST /v1/grpc/Push/UnregisterApplePush *
RegisterApplePushKit POST /v1/grpc/Push/RegisterApplePushKit *
UnregisterApplePushKit POST /v1/grpc/Push/UnregisterApplePushKit *
RegisterApplePushToken POST /v1/grpc/Push/RegisterApplePushToken *
UnregisterApplePushToken POST /v1/grpc/Push/UnregisterApplePushToken *

raw_api.proto

Top

RequestRawRequest

FieldTypeLabelDescription
service google.protobuf.StringValue

body google.protobuf.BytesValue

ResponseRawRequest

FieldTypeLabelDescription
body google.protobuf.BytesValue

RawAPI

Method NameRequest TypeResponse TypeDescription
RawRequest RequestRawRequest ResponseRawRequest

Methods with HTTP bindings

Method Name Method Pattern Body
RawRequest POST /v1/grpc/RawAPI/RawRequest *

registration.proto

Top

RegisterDeprecatedDeviceRequest

RequestExchangeAuthIdForToken

FieldTypeLabelDescription
auth_id int64

signature bytes

RequestRegisterDevice

FieldTypeLabelDescription
client_pk bytes

app_id int32

app_title string

device_title string

ResponseDeviceRequest

FieldTypeLabelDescription
server_pk bytes

auth_id int64

token string

auth_method_seq AuthorizationMethod repeated

Sequence of the required authorization methods

AuthorizationMethod

NameNumberDescription
nothing 0

login_password 1

phone 2

email 3

certificate 4

Registration

Method NameRequest TypeResponse TypeDescription
ExchangeAuthIdForToken RequestExchangeAuthIdForToken ResponseDeviceRequest

RegisterDevice RequestRegisterDevice ResponseDeviceRequest

register device to get auth token

RegisterDeprecatedDevice RegisterDeprecatedDeviceRequest ResponseDeviceRequest

deprecated

Methods with HTTP bindings

Method Name Method Pattern Body
ExchangeAuthIdForToken POST /v1/grpc/Registration/ExchangeAuthIdForToken *
RegisterDevice POST /v1/grpc/Registration/RegisterDevice *
RegisterDeprecatedDevice POST /v1/grpc/Registration/RegisterDeprecatedDevice *

search.proto

Top

MessageSearchItem

Message Search result container

FieldTypeLabelDescription
result MessageSearchResult

MessageSearchResult

Message container

FieldTypeLabelDescription
peer Peer

rid int64

deprecated

date int64

sender_id int32

content MessageContent

PeerSearchResult

Peer search result

FieldTypeLabelDescription
peer Peer

title string

shortname google.protobuf.StringValue

description google.protobuf.StringValue

members_count google.protobuf.Int32Value

date_created int64

Group Creation Date

creator google.protobuf.Int32Value

is_public google.protobuf.BoolValue

is_joined google.protobuf.BoolValue

Are you joined?

RequestFieldAutocomplete

FieldTypeLabelDescription
field_name string

field_value string

RequestGetRecommendations

RequestLoadUserSearchByPredicatesCount

FieldTypeLabelDescription
predicates SearchPredicate repeated

group_id int32

RequestLoadUserSearchByPredicatesResults

FieldTypeLabelDescription
predicates SearchPredicate repeated

group_id int32

query google.protobuf.StringValue

limit int32

required_fields string repeated

RequestMessageSearch

Performing message search

FieldTypeLabelDescription
query SearchCondition

optimizations UpdateOptimization repeated

RequestMessageSearchMore

Performing message search paging

FieldTypeLabelDescription
load_more_state bytes

Cursor

optimizations UpdateOptimization repeated

RequestPeerSearch

Performing peer search

FieldTypeLabelDescription
query SearchCondition repeated

optimizations UpdateOptimization repeated

RequestResolvePeer

Resolve peer by shortname

FieldTypeLabelDescription
shortname string

RequestSimpleSearch

FieldTypeLabelDescription
criteria SimpleSearchCondition repeated

optimizations UpdateOptimization repeated

RequestSimpleSearchMore

FieldTypeLabelDescription
load_more_state bytes

Cursor

optimizations UpdateOptimization repeated

ResponseFieldAutocomplete

FieldTypeLabelDescription
field_name string

field_value string repeated

ResponseGetRecommendations

FieldTypeLabelDescription
peers OutPeer repeated

ResponseLoadUserSearchByPredicatesCount

FieldTypeLabelDescription
result_count int32

ResponseLoadUserSearchByPredicatesResults

FieldTypeLabelDescription
users UserMatch repeated

result_count int32

ResponseMessageSearchResponse

Search Result with related peers and entities

FieldTypeLabelDescription
search_results MessageSearchItem repeated

users User repeated

groups Group repeated

load_more_state google.protobuf.BytesValue

user_out_peers UserOutPeer repeated

group_out_peers GroupOutPeer repeated

ResponsePeerSearch

Response with related peers and entities

FieldTypeLabelDescription
search_results PeerSearchResult repeated

users User repeated

groups Group repeated

user_peers UserOutPeer repeated

group_peers GroupOutPeer repeated

ResponseResolvePeer

FieldTypeLabelDescription
peer OutPeer

SearchAndCondition

Search AND condion

FieldTypeLabelDescription
and_query SearchCondition repeated

"And" query

SearchCondition

FieldTypeLabelDescription
searchPeerTypeCondition SearchPeerTypeCondition

searchPieceText SearchPieceText

searchAndCondition SearchAndCondition

searchOrCondition SearchOrCondition

searchPeerCondition SearchPeerCondition

searchPeerContentType SearchPeerContentType

searchSenderIdConfition SearchSenderIdConfition

SearchOrCondition

Search OR condition

FieldTypeLabelDescription
or_query SearchCondition repeated

"Or" query

SearchPeerCondition

Serch Peer condition

FieldTypeLabelDescription
peer OutPeer

SearchPeerContentType

Search content type condition

FieldTypeLabelDescription
content_type SearchContentType

SearchPeerTypeCondition

Search peer type condition

FieldTypeLabelDescription
peer_type SearchPeerType

SearchPieceText

Search peer name condition

FieldTypeLabelDescription
query string

SearchSenderIdConfition

Searching sender uid condition

FieldTypeLabelDescription
sender_id int32

SimpleContactSearchCondition

FieldTypeLabelDescription
text string

SimpleGroupSearchCondition

FieldTypeLabelDescription
query_string string

SimpleMessageSearchCondition

FieldTypeLabelDescription
peer Peer

where to search

text string

search term

content_type SearchContentType

content message type to search

SimplePeerSearchCondition

Search among contacts/groups/users

FieldTypeLabelDescription
peer_type SearchPeerType

text google.protobuf.StringValue

SimpleSearchCondition

FieldTypeLabelDescription
contact SimpleContactSearchCondition

message SimpleMessageSearchCondition

peer SimplePeerSearchCondition

userProfile SimpleUserProfileSearchCondition

group SimpleGroupSearchCondition

SimpleUserProfileSearchCondition

FieldTypeLabelDescription
query_string string

UserMatch

FieldTypeLabelDescription
user_id int32

match_predicates bool

criterion

SearchContentType

NameNumberDescription
SEARCHCONTENTTYPE_UNKNOWN 0

SEARCHCONTENTTYPE_ANY 1

SEARCHCONTENTTYPE_TEXT 2

SEARCHCONTENTTYPE_LINKS 3

SEARCHCONTENTTYPE_DOCUMENTS 4

SEARCHCONTENTTYPE_PHOTOS 5

SearchPeerType

NameNumberDescription
SEARCHPEERTYPE_UNKNOWN 0

SEARCHPEERTYPE_GROUPS 1

SEARCHPEERTYPE_CONTACTS 2

SEARCHPEERTYPE_PUBLIC 3

Search

Method NameRequest TypeResponse TypeDescription
PeerSearch RequestPeerSearch ResponsePeerSearch

Search among groups/users/contacts

ResolvePeer RequestResolvePeer ResponseResolvePeer

MessageSearch RequestMessageSearch ResponseMessageSearchResponse

Search by messages

MessageSearchMore RequestMessageSearchMore ResponseMessageSearchResponse

SimpleSearch RequestSimpleSearch ResponseMessageSearchResponse

Custom search by conditions

SimpleSearchMore RequestSimpleSearchMore ResponseMessageSearchResponse

AutocompleteSuggestions RequestFieldAutocomplete ResponseFieldAutocomplete

Search for autocomplete suggestions among custom user profile

LoadUserSearchByPredicatesResults RequestLoadUserSearchByPredicatesResults ResponseLoadUserSearchByPredicatesResults

LoadUserSearchByPredicatesCount RequestLoadUserSearchByPredicatesCount ResponseLoadUserSearchByPredicatesCount

GetRecommendations RequestGetRecommendations ResponseGetRecommendations

Methods with HTTP bindings

Method Name Method Pattern Body
PeerSearch POST /v1/grpc/Search/PeerSearch *
ResolvePeer POST /v1/grpc/Search/ResolvePeer *
MessageSearch POST /v1/grpc/Search/MessageSearch *
MessageSearchMore POST /v1/grpc/Search/MessageSearchMore *
SimpleSearch POST /v1/grpc/Search/SimpleSearch *
SimpleSearchMore POST /v1/grpc/Search/SimpleSearchMore *
AutocompleteSuggestions POST /v1/grpc/Search/AutocompleteSuggestions *
LoadUserSearchByPredicatesResults POST /v1/grpc/Search/LoadUserSearchByPredicatesResults *
LoadUserSearchByPredicatesCount POST /v1/grpc/Search/LoadUserSearchByPredicatesCount *
GetRecommendations POST /v1/grpc/Search/GetRecommendations *

sequence_and_updates.proto

Top

GroupMembersSubset

Represents subset of group members

FieldTypeLabelDescription
group_peer GroupOutPeer

member_ids int32 repeated

RequestGetDialogsDifference

Getting difference of dialogs

FieldTypeLabelDescription
clock int64

max of the last action dates among all user's dialogs

RequestGetDifference

Getting difference of sequence

FieldTypeLabelDescription
seq int32

state bytes

optimizations UpdateOptimization repeated

config_hash google.protobuf.Int64Value

RequestGetReferencedEntitites

Loading referenced entities

FieldTypeLabelDescription
users UserOutPeer repeated

users needed

mids UUIDValue repeated

messages needed

group_members GroupMembersSubset repeated

Group + subset of members to return. For loading members of big groups by chunks.

groups GroupOutPeer repeated

groups needed

RequestGetState

Get main sequence state

FieldTypeLabelDescription
optimizations UpdateOptimization repeated

RequestSubscribeFromGroupOnline

Removing subscription for groups online

FieldTypeLabelDescription
groups GroupOutPeer repeated

RequestSubscribeFromOnline

Removing subscription for users online

FieldTypeLabelDescription
users UserOutPeer repeated

RequestSubscribeToGroupOnline

Subscribing for groups online

FieldTypeLabelDescription
groups GroupOutPeer repeated

RequestSubscribeToOnline

Subscribing for users online

FieldTypeLabelDescription
users UserOutPeer repeated

ResponseGetDialogsDifference

Dialogs + peers and entities

FieldTypeLabelDescription
dialogs Dialog repeated

group_peers GroupOutPeer repeated

user_peers UserOutPeer repeated

ResponseGetDifference

Updates happens after requested seq number + related peers and entities

FieldTypeLabelDescription
seq int32

seq of the last loaded update

state bytes

users User repeated

groups Group repeated

updates UpdateSeqUpdate repeated

messages HistoryMessage repeated

need_more bool

false if all updates returned

users_refs UserOutPeer repeated

groups_refs GroupOutPeer repeated

config Config

user's config

config_hash google.protobuf.Int64Value

ResponseGetReferencedEntitites

FieldTypeLabelDescription
users User repeated

groups Group repeated

messages HistoryMessage repeated

SeqUpdateBox

Container which contains UpdateSeqUpdate

FieldTypeLabelDescription
seq int32

state bytes

update google.protobuf.BytesValue

UpdateSeqUpdate in bytes

unboxed_update UpdateSeqUpdate

UpdateCombinedUpdate

Combined update

FieldTypeLabelDescription
seq_start int32

start of related sequence intervals

seq_end int32

end of related sequence intervals

state bytes

users User repeated

related users

groups Group repeated

related groups

updates UpdateContainer repeated

messages HistoryMessage repeated

related messages

UpdateContainer

Update container

FieldTypeLabelDescription
update_header int32

update bytes

UpdateEmptyUpdate

Empty update

UpdateFatSeqUpdate

Fat sequence update with additional data

FieldTypeLabelDescription
seq int32

state bytes

update_header int32

update bytes

users User repeated

related users

groups Group repeated

related groups

UpdateRawUpdate

Custom Raw Update

FieldTypeLabelDescription
type google.protobuf.StringValue

bytes bytes

UpdateSeqUpdate

Sequence update

FieldTypeLabelDescription
seq int32

state bytes

update_header int32

updateForceReloadState UpdateForceReloadState

updateUserAvatarChanged UpdateUserAvatarChanged

updateUserNameChanged UpdateUserNameChanged

updateUserLocalNameChanged UpdateUserLocalNameChanged

updateUserContactsChanged UpdateUserContactsChanged

updateUserNickChanged UpdateUserNickChanged

updateUserAboutChanged UpdateUserAboutChanged

updateUserPreferredLanguagesChanged UpdateUserPreferredLanguagesChanged

updateUserTimeZoneChanged UpdateUserTimeZoneChanged

updateUserBotCommandsChanged UpdateUserBotCommandsChanged

updateUserExtChanged UpdateUserExtChanged

updateUserFullExtChanged UpdateUserFullExtChanged

updateUserSexChanged UpdateUserSexChanged

updateUserCustomProfileChanged UpdateUserCustomProfileChanged

updateUserStatusChanged UpdateUserStatusChanged

updateContactRegistered UpdateContactRegistered

updateContactsAdded UpdateContactsAdded

updateContactsAddTaskSuspended UpdateContactsAddTaskSuspended

updateContactsRemoved UpdateContactsRemoved

updateUserBlocked UpdateUserBlocked

updateUserUnblocked UpdateUserUnblocked

updateInteractiveMediaEvent UpdateInteractiveMediaEvent

updateMessage UpdateMessage

updateMessageContentChanged UpdateMessageContentChanged

updateMessageSent UpdateMessageSent

updateMessageReceived UpdateMessageReceived

updateMessageRead UpdateMessageRead

updateMessageReadByMe UpdateMessageReadByMe

updateMessageDelete UpdateMessageDelete

updateChatClear UpdateChatClear

updateChatDelete UpdateChatDelete

updateChatArchive UpdateChatArchive

updateChatGroupsChanged UpdateChatGroupsChanged

updateReactionsUpdate UpdateReactionsUpdate

updateDialogFavouriteChanged UpdateDialogFavouriteChanged

updatePinnedMessagesChanged UpdatePinnedMessagesChanged

updateGroupTitleChanged UpdateGroupTitleChanged

updateGroupAvatarChanged UpdateGroupAvatarChanged

updateGroupTopicChanged UpdateGroupTopicChanged

updateGroupAboutChanged UpdateGroupAboutChanged

updateGroupOwnerChanged UpdateGroupOwnerChanged

updateGroupHistoryShared UpdateGroupHistoryShared

updateGroupCanSendMessagesChanged UpdateGroupCanSendMessagesChanged

updateGroupCanViewMembersChanged UpdateGroupCanViewMembersChanged

updateGroupCanInviteMembersChanged UpdateGroupCanInviteMembersChanged

updateGroupMemberChanged UpdateGroupMemberChanged

updateGroupMembersBecameAsync UpdateGroupMembersBecameAsync

updateGroupMembersUpdated UpdateGroupMembersUpdated

updateGroupMemberDiff UpdateGroupMemberDiff

updateGroupMembersCountChanged UpdateGroupMembersCountChanged

updateGroupMemberAdminChanged UpdateGroupMemberAdminChanged

updateGroupMemberPermissionsChanged UpdateGroupMemberPermissionsChanged

updateGroupInviteObsolete UpdateGroupInviteObsolete

updateGroupUserInvitedObsolete UpdateGroupUserInvitedObsolete

updateGroupUserLeaveObsolete UpdateGroupUserLeaveObsolete

updateGroupUserKickObsolete UpdateGroupUserKickObsolete

updateGroupMembersUpdateObsolete UpdateGroupMembersUpdateObsolete

updateGroupTitleChangedObsolete UpdateGroupTitleChangedObsolete

updateGroupTopicChangedObsolete UpdateGroupTopicChangedObsolete

updateGroupAboutChangedObsolete UpdateGroupAboutChangedObsolete

updateGroupAvatarChangedObsolete UpdateGroupAvatarChangedObsolete

updateGroupShortnameChanged UpdateGroupShortnameChanged

updateStickerCollectionsChanged UpdateStickerCollectionsChanged

updateStickerPackRemoved UpdateStickerPackRemoved

updateStickerPackAdded UpdateStickerPackAdded

updatePauseNotifications UpdatePauseNotifications

updateRestoreNotifications UpdateRestoreNotifications

updateTyping UpdateTyping

updateTypingStop UpdateTypingStop

updateUserOnline UpdateUserOnline

updateUserOffline UpdateUserOffline

updateUserLastSeen UpdateUserLastSeen

updateGroupOnline UpdateGroupOnline

updateEventBusDeviceConnected UpdateEventBusDeviceConnected

updateEventBusDeviceDisconnected UpdateEventBusDeviceDisconnected

updateEventBusMessage UpdateEventBusMessage

updateEventBusDisposed UpdateEventBusDisposed

updateIncomingCallDeprecated UpdateIncomingCallDeprecated

updateIncomingCall UpdateIncomingCall

updateCallHandled UpdateCallHandled

updateCallDisposed UpdateCallDisposed

updateParameterChanged UpdateParameterChanged

updateRawUpdate UpdateRawUpdate

updateEmptyUpdate UpdateEmptyUpdate

updateCountersChanged UpdateCountersChanged

updateConfig UpdateConfig

updateSpaceModified UpdateSpaceModified

updateSpaceMemberModified UpdateSpaceMemberModified

updateMessageRejectedByHook UpdateMessageRejectedByHook

updateMessageEditRejectedByHook UpdateMessageEditRejectedByHook

updateUser UpdateUser

updateFeatureFlagChanged UpdateFeatureFlagChanged

updateThreadCreated UpdateThreadCreated

updateThreadLifted UpdateThreadLifted

updateGroup UpdateGroup

UpdateSeqUpdateTooLong

Notification about requiring performing manual GetDifference

UpdateWeakFatUpdate

Fat Weak Update

FieldTypeLabelDescription
date int64

update_header int32

update bytes

users User repeated

groups Group repeated

UpdateWeakUpdate

Out of sequence update (for typing and online statuses)

FieldTypeLabelDescription
date int64

update_header int32

update bytes

SequenceAndUpdates

Method NameRequest TypeResponse TypeDescription
GetState RequestGetState ResponseSeq

Get last seq number

GetDifference RequestGetDifference ResponseGetDifference

Get all update that happens after given seq number

GetDialogsDifference RequestGetDialogsDifference ResponseGetDialogsDifference

Load all dialogs that changed after given date

GetReferencedEntitites RequestGetReferencedEntitites ResponseGetReferencedEntitites

Load some required entities

SubscribeToOnline RequestSubscribeToOnline ResponseVoid

SubscribeFromOnline RequestSubscribeFromOnline ResponseVoid

SubscribeToGroupOnline RequestSubscribeToGroupOnline ResponseVoid

SubscribeFromGroupOnline RequestSubscribeFromGroupOnline ResponseVoid

SeqUpdates .google.protobuf.Empty SeqUpdateBox stream

Get stream of the user's updates

Methods with HTTP bindings

Method Name Method Pattern Body
GetState POST /v1/grpc/SequenceAndUpdates/GetState *
GetDifference POST /v1/grpc/SequenceAndUpdates/GetDifference *
GetDialogsDifference POST /v1/grpc/SequenceAndUpdates/GetDialogsDifference *
GetReferencedEntitites POST /v1/grpc/SequenceAndUpdates/GetReferencedEntitites *
SubscribeToOnline POST /v1/grpc/SequenceAndUpdates/SubscribeToOnline *
SubscribeFromOnline POST /v1/grpc/SequenceAndUpdates/SubscribeFromOnline *
SubscribeToGroupOnline POST /v1/grpc/SequenceAndUpdates/SubscribeToGroupOnline *
SubscribeFromGroupOnline POST /v1/grpc/SequenceAndUpdates/SubscribeFromGroupOnline *
SeqUpdates POST /v1/grpc/SequenceAndUpdates/SeqUpdates *

spaces.proto

Top

RequestCreateSpace

FieldTypeLabelDescription
request_id int64

title string

shortname google.protobuf.StringValue

about google.protobuf.StringValue

avatar Avatar

RequestDeleteSpace

FieldTypeLabelDescription
id UUIDValue

clock DataClock

RequestGetSpaceInviteUrl

FieldTypeLabelDescription
id UUIDValue

RequestLoadSpaces

RequestRevokeSpaceInviteUrl

FieldTypeLabelDescription
id UUIDValue

RequestSetAbout

FieldTypeLabelDescription
id UUIDValue

about google.protobuf.StringValue

clock DataClock

RequestSetAvatar

FieldTypeLabelDescription
id UUIDValue

file_location FileLocation

clock DataClock

RequestSetShortname

FieldTypeLabelDescription
id UUIDValue

shortname google.protobuf.StringValue

clock DataClock

RequestSetTitle

FieldTypeLabelDescription
id UUIDValue

title string

clock DataClock

RequestSpaceInvite

FieldTypeLabelDescription
id UUIDValue

user_id int32

clock DataClock

RequestSpaceKick

FieldTypeLabelDescription
id UUIDValue

user_id int32

clock DataClock

RequestSpaceLeave

FieldTypeLabelDescription
id UUIDValue

user_id int32

clock DataClock

RequestStreamSpaceMembers

FieldTypeLabelDescription
space_id UUIDValue

clock DataClock

ResponseLoadSpaces

FieldTypeLabelDescription
space Space repeated

owner_peers UserOutPeer repeated

ResponseSpace

FieldTypeLabelDescription
space Space

ResponseSpaceInviteUrl

FieldTypeLabelDescription
invite_url string

ResponseSpaceMember

FieldTypeLabelDescription
space_id UUIDValue

member SpaceMember

Space

FieldTypeLabelDescription
id UUIDValue

created_at google.protobuf.Timestamp

general Space.General

public Space.Public

private Space.Private

title string

about google.protobuf.StringValue

avatar Avatar

deleted_at google.protobuf.Timestamp

clock DataClock

Space.General

Space.Private

FieldTypeLabelDescription
owner_user_id int32

Space.Public

FieldTypeLabelDescription
owner_user_id int32

shortname string

SpaceMember

FieldTypeLabelDescription
space_id UUIDValue

user_id int32

invited_at google.protobuf.Timestamp

joined_at google.protobuf.Timestamp

deleted_at google.protobuf.Timestamp

clock DataClock

SpaceMemberWithPeer

FieldTypeLabelDescription
member SpaceMember

peer UserOutPeer

UpdateSpaceMemberModified

FieldTypeLabelDescription
member SpaceMember

UpdateSpaceModified

FieldTypeLabelDescription
space Space

Spaces

Method NameRequest TypeResponse TypeDescription
CreateSpace RequestCreateSpace ResponseSpace

DeleteSpace RequestDeleteSpace ResponseSpace

SetTitle RequestSetTitle ResponseSpace

SetShortname RequestSetShortname ResponseSpace

SetAbout RequestSetAbout ResponseSpace

SetAvatar RequestSetAvatar ResponseSpace

LoadSpaces RequestLoadSpaces ResponseLoadSpaces

LoadSpaceMembers RequestStreamSpaceMembers SpaceMemberWithPeer stream

Invite RequestSpaceInvite ResponseSpaceMember

Kick RequestSpaceKick ResponseSpaceMember

Leave RequestSpaceLeave ResponseSpaceMember

GetSpaceInviteUrl RequestGetSpaceInviteUrl ResponseSpaceInviteUrl

RevokeSpaceInviteUrl RequestRevokeSpaceInviteUrl ResponseSpaceInviteUrl

stickers.proto

Top

RequestAddStickerCollection

Adding sticker collection

FieldTypeLabelDescription
title string

RequestAddStickerPackReference

Add a reference to other user's sticker pack

FieldTypeLabelDescription
source_sticker_pack int32

RequestLoadAcesssibleStickers

Load accessible stickers

FieldTypeLabelDescription
from_clock int64

RequestLoadOwnStickers

Loading own stickers

FieldTypeLabelDescription
from_clock int64

RequestLoadStickerCollection

Loading stickers

FieldTypeLabelDescription
id int32

RequestRemoveStickerCollection

Removing sticker collection

FieldTypeLabelDescription
id int32

RequestRemoveStickerPackReference

Remove a reference to an other user's sticker pack

FieldTypeLabelDescription
source_sticker_pack int32

ResponseLoadAcesssibleStickers

FieldTypeLabelDescription
accessible_stickers StickerCollection repeated

removed_collections StickerCollection repeated

clock int64

prev_clock int64

ResponseLoadOwnStickers

FieldTypeLabelDescription
own_stickers StickerCollection repeated

removed_collections StickerCollection repeated

clock int64

prev_clock int64

ResponseLoadStickerCollection

FieldTypeLabelDescription
collection StickerCollection

ResponseStickersResponse

Stickers response

FieldTypeLabelDescription
collections StickerCollection repeated

seq int32

deprecated

state bytes

removed_collections StickerCollection repeated

clock int64

prev_clock int64

StickerCollection

Sticker collection

FieldTypeLabelDescription
id int32

Unique id of a collection

title google.protobuf.StringValue

Sticker pack title

stickers StickerDescriptor repeated

owned_by_me google.protobuf.BoolValue

does this pack belongs to current user

clock int64

StickerDescriptor

Descriptor of a Sticker

FieldTypeLabelDescription
id int32

Sticker unique id

emoji google.protobuf.StringValue

Emoji code for sticker

image_128 ImageLocation

Image of sticker 128x128 in WebP format

image_512 ImageLocation

Image of sticker 512x512 in WebP format

image_256 ImageLocation

Image of sticker 256x256 in WebP format

UpdateStickerCollectionsChanged

Sticker collection changed

FieldTypeLabelDescription
updated_collections StickerCollection repeated

UpdateStickerPackAdded

Sticker pack was added

FieldTypeLabelDescription
pack StickerCollection

UpdateStickerPackRemoved

Sticker pack removed

FieldTypeLabelDescription
pack_id int32

Stickers

Method NameRequest TypeResponse TypeDescription
LoadOwnStickers RequestLoadOwnStickers ResponseLoadOwnStickers

LoadAcesssibleStickers RequestLoadAcesssibleStickers ResponseLoadAcesssibleStickers

AddStickerPackReference RequestAddStickerPackReference ResponseSeq

RemoveStickerPackReference RequestRemoveStickerPackReference ResponseSeq

AddStickerCollection RequestAddStickerCollection ResponseSeq

RemoveStickerCollection RequestRemoveStickerCollection ResponseSeq

LoadStickerCollection RequestLoadStickerCollection ResponseLoadStickerCollection

Methods with HTTP bindings

Method Name Method Pattern Body
LoadOwnStickers POST /v1/grpc/Stickers/LoadOwnStickers *
LoadAcesssibleStickers POST /v1/grpc/Stickers/LoadAcesssibleStickers *
AddStickerPackReference POST /v1/grpc/Stickers/AddStickerPackReference *
RemoveStickerPackReference POST /v1/grpc/Stickers/RemoveStickerPackReference *
AddStickerCollection POST /v1/grpc/Stickers/AddStickerCollection *
RemoveStickerCollection POST /v1/grpc/Stickers/RemoveStickerCollection *
LoadStickerCollection POST /v1/grpc/Stickers/LoadStickerCollection *

threads.proto

Top

RequestCreateThread

Create a threaded conversation inside a group

FieldTypeLabelDescription
random_id int64

random request id for query deduplication

parent_group_peer GroupOutPeer

parent group where thread is created

start_message_id UUIDValue

message from where thread starts

title string

thread title

join_policy RequestCreateThread.JoinPolicy

thread join policy: for all group members or invite only

members UserOutPeer repeated

members

RequestJoinThread

Join public thread

FieldTypeLabelDescription
parent_group_peer GroupOutPeer

parent group where thread is created

thread_group_peer GroupOutPeer

group representing thread about to be joined

RequestLiftThread

Converts thread into a group

FieldTypeLabelDescription
random_id int64

Id for query deduplication

parent_group_peer GroupOutPeer

parent group where thread is created

thread_group_peer GroupOutPeer

group representing thread about to be lifted

title google.protobuf.StringValue

lifted group title

RequestLoadGroupThreads

Load group threads available for user

FieldTypeLabelDescription
group GroupOutPeer

ResponseCreateThread

Thread creation response

FieldTypeLabelDescription
thread_group Group

group, representing thread internally

users User repeated

participants of created conversation. empty if dropped by optimizations

user_peers UserOutPeer repeated

corresponding user peers. empty if dropped by optimizations

ResponseLiftThread

Thread lift response

FieldTypeLabelDescription
group Group

group, representing lifted group

peer GroupOutPeer

group peer

ResponseLoadGroupThreads

FieldTypeLabelDescription
threads ThreadReference repeated

ThreadReference

FieldTypeLabelDescription
message_id UUIDValue

peer OutPeer

RequestCreateThread.JoinPolicy

NameNumberDescription
INVITE_ONLY 0

THREAD_MEMBERS 1

Threads

Method NameRequest TypeResponse TypeDescription
CreateThread RequestCreateThread ResponseCreateThread

LiftThread RequestLiftThread ResponseLiftThread

LoadGroupThreads RequestLoadGroupThreads ResponseLoadGroupThreads

JoinThread RequestJoinThread ResponseVoid

Methods with HTTP bindings

Method Name Method Pattern Body
CreateThread POST /v1/grpc/Threads/CreateThread *
LiftThread POST /v1/grpc/Threads/LiftThread *
LoadGroupThreads POST /v1/grpc/Threads/LoadGroupThreads *
JoinThread POST /v1/grpc/Threads/JoinThread *

typing_and_online.proto

Top

RequestGetUserLastPresence

Request for last user online timestamp

FieldTypeLabelDescription
user_out_peer UserOutPeer

RequestPauseNotifications

Pause notifications

FieldTypeLabelDescription
timeout int32

RequestRestoreNotifications

Restoring notifications

RequestSetOnline

Sending online state

FieldTypeLabelDescription
is_online bool

timeout int64

offline after timeout

device_type DeviceType

device_category google.protobuf.StringValue

RequestStopTyping

Stop typing

FieldTypeLabelDescription
peer OutPeer

typing_type TypingType

RequestTyping

Sending typing notification

FieldTypeLabelDescription
peer OutPeer

typing_type TypingType

ResponseUserLastPresence

Response for RequestGetUserLastPresence

FieldTypeLabelDescription
last_online_at google.protobuf.Timestamp

not_found_error ResponseUserLastPresence.UserNotFoundError

ResponseUserLastPresence.UserNotFoundError

UpdateGroupOnline

Update about group online change

FieldTypeLabelDescription
group_id int32

count int32

amount of online users

UpdatePauseNotifications

Update about pausing notifications

FieldTypeLabelDescription
timeout int32

UpdateRestoreNotifications

Update about restoring notifications

UpdateTyping

Update about user's typing

FieldTypeLabelDescription
peer Peer

uid int32

typing_type TypingType

UpdateTypingStop

Update about user's typing stop

FieldTypeLabelDescription
peer Peer

uid int32

typing_type TypingType

UpdateUserLastSeen

Update about user's last seen state

FieldTypeLabelDescription
uid int32

date int64

device_type DeviceType

device_category google.protobuf.StringValue

UpdateUserOffline

Update about user became offline

FieldTypeLabelDescription
uid int32

device_type DeviceType

device_category google.protobuf.StringValue

UpdateUserOnline

Update about user became online

FieldTypeLabelDescription
uid int32

device_type DeviceType

device_category google.protobuf.StringValue

DeviceType

NameNumberDescription
DEVICETYPE_UNKNOWN 0

DEVICETYPE_GENERIC 1

DEVICETYPE_PC 2

DEVICETYPE_MOBILE 3

DEVICETYPE_TABLET 4

DEVICETYPE_WATCH 5

DEVICETYPE_MIRROR 6

DEVICETYPE_CAR 7

DEVICETYPE_TABLE 8

TypingType

NameNumberDescription
TYPINGTYPE_UNKNOWN 0

TYPINGTYPE_TEXT 1

TypingAndOnline

Method NameRequest TypeResponse TypeDescription
Typing RequestTyping ResponseVoid

StopTyping RequestStopTyping ResponseVoid

SetOnline RequestSetOnline ResponseVoid

PauseNotifications RequestPauseNotifications ResponseVoid

RestoreNotifications RequestRestoreNotifications ResponseVoid

GetUserLastPresence RequestGetUserLastPresence ResponseUserLastPresence

Methods with HTTP bindings

Method Name Method Pattern Body
Typing POST /v1/grpc/TypingAndOnline/Typing *
StopTyping POST /v1/grpc/TypingAndOnline/StopTyping *
SetOnline POST /v1/grpc/TypingAndOnline/SetOnline *
PauseNotifications POST /v1/grpc/TypingAndOnline/PauseNotifications *
RestoreNotifications POST /v1/grpc/TypingAndOnline/RestoreNotifications *
GetUserLastPresence POST /v1/grpc/TypingAndOnline/GetUserLastPresence *

users.proto

Top

BotCommand

Available bot commands

FieldTypeLabelDescription
slash_command string

Slash command name (wihtout slash)

description string

Slash command description

loc_key google.protobuf.StringValue

Optional Localization Key for i18n

ContactRecord

Contact information record

FieldTypeLabelDescription
type ContactType

type_spec google.protobuf.StringValue

Value for specification type of contact, for example 'mobile/standalone/office' for phones or 'vk/fb/telegram' for extenrnal networks.

string_value google.protobuf.StringValue

long_value google.protobuf.Int64Value

title google.protobuf.StringValue

subtitle google.protobuf.StringValue

FullUser

Full User representation - deprecated

FieldTypeLabelDescription
id int32

User's id

contact_info ContactRecord repeated

about google.protobuf.StringValue

preferred_languages string repeated

time_zone google.protobuf.StringValue

Time Zone of user in TZ format

bot_commands BotCommand repeated

is_blocked google.protobuf.BoolValue

custom_profile string

custom user profile info in JSON format

integration_token google.protobuf.StringValue

status UserStatus

RequestEditUserLocalName

Renaming of user's visible name

FieldTypeLabelDescription
uid int32

access_hash int64

name string

RequestLoadFullUsers

Loading Full User information

FieldTypeLabelDescription
user_peers UserOutPeer repeated

RequestLoadUserData

FieldTypeLabelDescription
claims RequestLoadUserData.Claim repeated

RequestLoadUserData.Claim

FieldTypeLabelDescription
user_peer Peer

p2p bool

group_member Peer

ResponseLoadFullUsers

FieldTypeLabelDescription
full_users FullUser repeated

ResponseLoadUserData

FieldTypeLabelDescription
users User repeated

UpdateUser

FieldTypeLabelDescription
id int32

data UserData

UpdateUserAboutChanged

Update about user's about changed

FieldTypeLabelDescription
uid int32

about google.protobuf.StringValue

UpdateUserAvatarChanged

Update about avatar changed

FieldTypeLabelDescription
uid int32

avatar Avatar

UpdateUserBotCommandsChanged

Update about bot commands changed

FieldTypeLabelDescription
uid int32

commands BotCommand repeated

UpdateUserContactsChanged

Update about contact information change

FieldTypeLabelDescription
uid int32

contact_records ContactRecord repeated

UpdateUserCustomProfileChanged

Update about user custom profile changed

FieldTypeLabelDescription
uid int32

custom_profile string

custom user profile info in JSON format

UpdateUserExtChanged

FieldTypeLabelDescription
uid int32

ext RecursiveMapValue

UpdateUserFullExtChanged

FieldTypeLabelDescription
uid int32

ext RecursiveMapValue

UpdateUserLocalNameChanged

Update about local name changed

FieldTypeLabelDescription
uid int32

local_name google.protobuf.StringValue

UpdateUserNameChanged

Update about name changed

FieldTypeLabelDescription
uid int32

name string

UpdateUserNickChanged

Update about nick changed

FieldTypeLabelDescription
uid int32

nickname google.protobuf.StringValue

UpdateUserPreferredLanguagesChanged

Update about user's preferred languages

FieldTypeLabelDescription
uid int32

preferred_languages string repeated

UpdateUserSexChanged

Update about user sex changed

FieldTypeLabelDescription
uid int32

sex Sex

UpdateUserStatusChanged

Update about user status change

FieldTypeLabelDescription
uid int32

status UserStatus

UpdateUserTimeZoneChanged

User TimeZone changed

FieldTypeLabelDescription
uid int32

time_zone google.protobuf.StringValue

User

FieldTypeLabelDescription
id int32

User's id

access_hash int64

data UserData

required

UserData

Main user object

FieldTypeLabelDescription
name string

nick google.protobuf.StringValue

sex Sex

avatar Avatar

is_bot google.protobuf.BoolValue

status UserData.Lifecycle

user_status UserStatus

time_zone string

exts UserData.Ext repeated

clock DataClock

locales string repeated

UserData.Ext

FieldTypeLabelDescription
key string

s string

b bool

UserProfile

FieldTypeLabelDescription
user User

contact_info ContactRecord repeated

about google.protobuf.StringValue

preferred_languages string repeated

time_zone google.protobuf.StringValue

Time Zone of user in TZ format

bot_commands BotCommand repeated

custom_profile string

custom user profile info in JSON format

integration_token google.protobuf.StringValue

UserStatus

User's status

FieldTypeLabelDescription
type UserStatusType

text google.protobuf.StringValue

Text supplied by user

clock int64

ContactType

NameNumberDescription
CONTACTTYPE_UNKNOWN 0

CONTACTTYPE_PHONE 1

CONTACTTYPE_EMAIL 2

CONTACTTYPE_WEB 3

CONTACTTYPE_SOCIAL 4

Sex

NameNumberDescription
SEX_UNKNOWN 0

SEX_MALE 2

SEX_FEMALE 3

UserData.Lifecycle

NameNumberDescription
MISSED 0

ACTIVE 1

DELETED 2

BLOCKED 3

BLOCKED_AND_DELETED 4

UserStatusType

NameNumberDescription
USERSTATUSTYPE_UNKNOWN 0

USERSTATUSTYPE_UNSET 1

USERSTATUSTYPE_AWAY 2

USERSTATUSTYPE_DONOTDISTURB 3

USERSTATUSTYPE_INVISIBLE 4

USERSTATUSTYPE_BUSY 5

Users

Method NameRequest TypeResponse TypeDescription
EditUserLocalName RequestEditUserLocalName ResponseSeq

LoadFullUsers RequestLoadFullUsers ResponseLoadFullUsers

Deprecated

LoadUserData RequestLoadUserData ResponseLoadUserData

Methods with HTTP bindings

Method Name Method Pattern Body
EditUserLocalName POST /v1/grpc/Users/EditUserLocalName *
LoadFullUsers POST /v1/grpc/Users/LoadFullUsers *
LoadUserData POST /v1/grpc/Users/LoadUserData *

web_rtc.proto

Top

ActiveCall

Active Calls. Used in broadcasting states of current calls.

FieldTypeLabelDescription
call_id int64

peer Peer

Call's peer

call_members CallMember repeated

Call Members

AdvertiseMaster

Sent by master

FieldTypeLabelDescription
server ICEServer repeated

a list of ICE servers

call_api_version google.protobuf.Int32Value

a verison of the call signaling

call_name google.protobuf.StringValue

AdvertisePeer

Peer advertisement

FieldTypeLabelDescription
device_id int64

device id of the peer

peer_settings PeerSettings

settings for the peer

ice_servers ICEServer repeated

ice servers for the peer

AdvertiseSelf

Advertizing self to a master mode

FieldTypeLabelDescription
peer_settings PeerSettings

Optional peer Settings

Answer

Answer signal

FieldTypeLabelDescription
session_id int64

Session Id of answer

sdp string

Answer SDP

CallLogEntry

This struct represents a call from the history

FieldTypeLabelDescription
id int64

call id

call_date int64

initiator OutPeer

recipient OutPeer

duration google.protobuf.Int64Value

answered google.protobuf.BoolValue

was the call answered by anybody

finished google.protobuf.BoolValue

display_name google.protobuf.StringValue

optional display name for this call

rejected google.protobuf.BoolValue

CallMember

Call Member

FieldTypeLabelDescription
user_id int32

Member User Id

state CallMemberStateHolder

State of member

CallMemberStateHolder

Call Member state holder

FieldTypeLabelDescription
state CallMemberState

State Value

fallback_is_ringing google.protobuf.BoolValue

Fallback flag for future compatibility of state

fallback_is_connected google.protobuf.BoolValue

Fallback flag for future compatibility of state

fallback_is_connecting google.protobuf.BoolValue

Fallback flag for future compatibility of state

fallback_is_ringing_reached google.protobuf.BoolValue

Fallback flag for future compatibility of state

fallback_is_ended google.protobuf.BoolValue

Fallback flag for future compatibility of state

CallNameChanged

Used to notify participants about call name changes

FieldTypeLabelDescription
call_name google.protobuf.StringValue

CallStats

Used to send call statistics to the server

FieldTypeLabelDescription
type CallStatsType

the type of the event

value string

the value of the event

Candidate

Candidate signal

FieldTypeLabelDescription
session_id int64

Session Id of candidate

index int32

Index of candidate

id string

Id of candidate

sdp string

SDP of candidate

CloseSession

Close this session and be ready to

FieldTypeLabelDescription
device int64

Device Id

session_id int64

Session Id for renegotiation

DTMF

Emulates DTMF key press

FieldTypeLabelDescription
code DTMFCode

duration int64

the duration (in milliseconds)

EnableConnection

Notification about enabling connection to peer

FieldTypeLabelDescription
device int64

Device Id

session_id int64

Session Id

GotICECandidate

WebRTC IceCandidate add signal.

Used to let the other party know about new ICE candidate, usually from onIceCandidate callback of WebRTC

FieldTypeLabelDescription
session_id int64

candidate ICECandidate

ICECandidate

Structure representing an ICE candidate

FieldTypeLabelDescription
sdp_m_line_index int32

sdp_mid string

sdp string

ICEServer

ICE Server description

FieldTypeLabelDescription
url string

Url to server

username google.protobuf.StringValue

Optional username

credential google.protobuf.StringValue

Optional credential

NeedDisconnect

Notification about requirement about required disconnection from peer

FieldTypeLabelDescription
device int64

Device Id

NeedOffer

Notification from master that offer is required

FieldTypeLabelDescription
device int64

Destination Device Id

session_id int64

Session Id

peer_settings PeerSettings

Deprecated peer settings

NegotinationSuccessful

Notification about on negotiation is successful

FieldTypeLabelDescription
device int64

Device Id

session_id int64

Session Id

Offer

Offer signal

FieldTypeLabelDescription
session_id int64

Session Id of offer

sdp string

Offer SDP

peer_settings PeerSettings

Deprecated Own Peer settings

OnRenegotiationNeeded

Need renegotiate session. For example when streams are changed.

FieldTypeLabelDescription
device int64

Device Id

session_id int64

Session Id

PeerSettings

Peer Settings

FieldTypeLabelDescription
can_pre_connect google.protobuf.BoolValue

If peer can preconnect before answer

sends_offer google.protobuf.BoolValue

The peer already has an offer. The server should request offer from this peer.

wait_for_candidates google.protobuf.BoolValue

Peer prefers to receive an offer/answer with ICE candidates collected

client_info ClientInfo

Description of this peer. Version, browser, OS, type, etc.

RemovedICECandidates

WebRTC IceCandidate remove signal

Used to let the other party know about ICE candidate list change, usually from onIceCandidatesRemoved callback

FieldTypeLabelDescription
session_id int64

candidate ICECandidate repeated

RequestChangeCallDisplayName

Changes the call display name

FieldTypeLabelDescription
call_id int64

display_name google.protobuf.StringValue

RequestDeleteCall

FieldTypeLabelDescription
call_id int64

RequestDoCall

Do Call. Right after a call client need to start sending CallInProgress

FieldTypeLabelDescription
peer OutPeer

timeout int64

RequestGetCallInfo

Getting Call Information

FieldTypeLabelDescription
call_id int64

RequestJoinCall

Joining Call

FieldTypeLabelDescription
call_id int64

RequestLoadCalls

Call this function to load call history

FieldTypeLabelDescription
next_offset google.protobuf.BytesValue

Cursor

limit int32

RequestRejectCall

Rejecting Call

FieldTypeLabelDescription
call_id int64

reason RejectCallReason

ResponseDoCall

FieldTypeLabelDescription
call_id int64

event_bus_id string

device_id int64

ResponseGetCallInfo

FieldTypeLabelDescription
peer Peer

groups GroupOutPeer repeated

users UserOutPeer repeated

event_bus_id string

display_name google.protobuf.StringValue

ResponseLoadCalls

Calls + related peers

FieldTypeLabelDescription
calls CallLogEntry repeated

users UserOutPeer repeated

groups GroupOutPeer repeated

next_offset google.protobuf.BytesValue

UpdateCallDisposed

Update about the call ending (all participants have left)

FieldTypeLabelDescription
call_id int64

attempt_index google.protobuf.Int32Value

reason CallDisposedReason

UpdateCallHandled

Update about incoming call handled

FieldTypeLabelDescription
call_id int64

attempt_index google.protobuf.Int32Value

UpdateIncomingCall

A new update about incoming call

FieldTypeLabelDescription
call_id int64

event_bus_id string

peer Peer

display_name google.protobuf.StringValue

Call visual name

attempt_index google.protobuf.Int32Value

out_peer OutPeer

video bool

UpdateIncomingCallDeprecated

Update about incoming call (Sent every 10 seconds)

FieldTypeLabelDescription
call_id int64

attempt_index google.protobuf.Int32Value

WebRTCSignaling

FieldTypeLabelDescription
advertiseSelf AdvertiseSelf

advertiseMaster AdvertiseMaster

advertisePeer AdvertisePeer

candidate Candidate

gotICECandidate GotICECandidate

removedICECandidates RemovedICECandidates

offer Offer

answer Answer

needOffer NeedOffer

negotinationSuccessful NegotinationSuccessful

enableConnection EnableConnection

onRenegotiationNeeded OnRenegotiationNeeded

closeSession CloseSession

needDisconnect NeedDisconnect

dTMF DTMF

callStats CallStats

callNameChanged CallNameChanged

CallDisposedReason

NameNumberDescription
CALLDISPOSEDREASON_UNKNOWN 0

CALLDISPOSEDREASON_REJECTED 1

CALLDISPOSEDREASON_BUSY 2

CALLDISPOSEDREASON_ENDED 3

CALLDISPOSEDREASON_ANSWER_TIMEOUT 4

CallMemberState

NameNumberDescription
CALLMEMBERSTATE_UNKNOWN 0

CALLMEMBERSTATE_RINGING 1

CALLMEMBERSTATE_RINGING_REACHED 4

CALLMEMBERSTATE_CONNECTING 2

CALLMEMBERSTATE_CONNECTED 3

CALLMEMBERSTATE_ENDED 5

CallStatsType

NameNumberDescription
CALLSTATSTYPE_UNKNOWN 0

CALLSTATSTYPE_TURN_SERVER_ROUND_TRIP_TIME 1

CALLSTATSTYPE_ICE_CONNECTION_FAILED 2

CALLSTATSTYPE_ICE_CONNECTION_CONNECTED 3

CALLSTATSTYPE_ICE_CONNECTION_DID_NOT_CONNECT 4

CALLSTATSTYPE_ICE_CONNECTION_CONNECTED_TIME 5

CALLSTATSTYPE_PEER_CONNECTION_CREATE_ANSWER_FAILED 6

CALLSTATSTYPE_PEER_CONNECTION_CREATE_OFFER_FAILED 7

CALLSTATSTYPE_PEER_CONNECTION_SET_REMOTE_DESCRIPTION_FAILED 8

CALLSTATSTYPE_PEER_CONNECTION_SET_LOCAL_DESCRIPTION_FAILED 9

DTMFCode

NameNumberDescription
DTMFCODE_UNKNOWN 0

DTMFCODE_ZERO 1

DTMFCODE_ONE 2

DTMFCODE_TWO 3

DTMFCODE_THREE 4

DTMFCODE_FOUR 5

DTMFCODE_FIVE 6

DTMFCODE_SIX 7

DTMFCODE_SEVEN 8

DTMFCODE_EIGHT 9

DTMFCODE_NINE 10

DTMFCODE_ASTERISK 11

DTMFCODE_POUND 12

DTMFCODE_A 13

DTMFCODE_B 14

DTMFCODE_C 15

DTMFCODE_D 16

RejectCallReason

NameNumberDescription
REJECTCALLREASON_UNKNOWN 0

REJECTCALLREASON_DECLINE 1

REJECTCALLREASON_BUSY 2

WebRTC

Method NameRequest TypeResponse TypeDescription
GetCallInfo RequestGetCallInfo ResponseGetCallInfo

LoadCalls RequestLoadCalls ResponseLoadCalls

DoCall RequestDoCall ResponseDoCall

JoinCall RequestJoinCall ResponseVoid

RejectCall RequestRejectCall ResponseVoid

ChangeCallDisplayName RequestChangeCallDisplayName ResponseVoid

DeleteCall RequestDeleteCall ResponseVoid

Methods with HTTP bindings

Method Name Method Pattern Body
GetCallInfo POST /v1/grpc/WebRTC/GetCallInfo *
LoadCalls POST /v1/grpc/WebRTC/LoadCalls *
DoCall POST /v1/grpc/WebRTC/DoCall *
JoinCall POST /v1/grpc/WebRTC/JoinCall *
RejectCall POST /v1/grpc/WebRTC/RejectCall *
ChangeCallDisplayName POST /v1/grpc/WebRTC/ChangeCallDisplayName *
DeleteCall POST /v1/grpc/WebRTC/DeleteCall *

Scalar Value Types

.proto TypeNotesC++ TypeJava TypePython Type
double double double float
float float float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long
uint32 Uses variable-length encoding. uint32 int int/long
uint64 Uses variable-length encoding. uint64 long int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long
sfixed32 Always four bytes. int32 int int
sfixed64 Always eight bytes. int64 long int/long
bool bool boolean boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode
bytes May contain any arbitrary sequence of bytes. string ByteString str