telegram api method · layer 229 · #ec86017a

account.registerDevice

usable by users

Register device to receive PUSH notifications

definition

account.registerDevice#ec86017a flags:# no_muted:flags.0?true token_type:int token:string app_sandbox:Bool secret:bytes other_uids:Vector<long> = Bool;

parameters

nametypedescription
flags#Flags, see TL conditional fields
no_mutedflags.0?trueAvoid receiving (silent and invisible background) notifications. Useful to save battery.
token_typeintDevice token type, see PUSH updates for the possible values.
tokenstringDevice token, see PUSH updates for the possible values.
app_sandboxBoolIf (boolTrue) is transmitted, a sandbox-certificate will be used during transmission.
secretbytesFor FCM and APNS VoIP, optional encryption key used to encrypt push notifications
other_uidsVector<long>List of user identifiers of other users currently using the client

returns

Bool

errors (8)

codeerrordescription
400BUSINESS_CONNECTION_NOT_ALLOWEDThis method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection.
400TOKEN_EMPTYThe specified token is empty.
400TOKEN_INVALIDThe provided token is invalid.
400TOKEN_TYPE_INVALIDThe specified token type is invalid.
400WEBPUSH_AUTH_INVALIDThe specified web push authentication secret is invalid.
400WEBPUSH_KEY_INVALIDThe specified web push elliptic curve Diffie-Hellman public key is invalid.
400WEBPUSH_TOKEN_INVALIDThe specified web push token is invalid.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).

history

present in layers 2–229 · constructor id changed 6×

idlayers
#a28557ac2–4
#446c712c5–46
#637ea87862–73
#001389cc74–75
#5cbea59076–102
#68976c6f103–132
#ec86017a133–229