telegram api method · layer 229 · #ec86017a
account.registerDevice
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
| name | type | description |
|---|---|---|
flags | # | Flags, see TL conditional fields |
no_muted | true | Avoid receiving (silent and invisible background) notifications. Useful to save battery. |
token_type | int | Device token type, see PUSH updates for the possible values. |
token | string | Device token, see PUSH updates for the possible values. |
app_sandbox | Bool | If (boolTrue) is transmitted, a sandbox-certificate will be used during transmission. |
secret | bytes | For FCM and APNS VoIP, optional encryption key used to encrypt push notifications |
other_uids | Vector<long> | List of user identifiers of other users currently using the client |
returns
errors (8)
| code | error | description |
|---|---|---|
| 400 | BUSINESS_CONNECTION_NOT_ALLOWED | This 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. |
| 400 | TOKEN_EMPTY | The specified token is empty. |
| 400 | TOKEN_INVALID | The provided token is invalid. |
| 400 | TOKEN_TYPE_INVALID | The specified token type is invalid. |
| 400 | WEBPUSH_AUTH_INVALID | The specified web push authentication secret is invalid. |
| 400 | WEBPUSH_KEY_INVALID | The specified web push elliptic curve Diffie-Hellman public key is invalid. |
| 400 | WEBPUSH_TOKEN_INVALID | The specified web push token is invalid. |
| 401 | AUTH_KEY_UNREGISTERED | The 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×
| id | layers |
|---|---|
| #a28557ac | 2–4 |
| #446c712c | 5–46 |
| #637ea878 | 62–73 |
| #001389cc | 74–75 |
| #5cbea590 | 76–102 |
| #68976c6f | 103–132 |
| #ec86017a | 133–229 |