account.RegisterDevice

class pyrogram.raw.functions.account.RegisterDevice

Register device to receive PUSH notifications

Details:
  • Layer: 223

  • ID: EC86017A

Parameters:
  • token_type (int 32-bit) – Device token type, see PUSH updates for the possible values.

  • token (str) – 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 (List of int 64-bit) – List of user identifiers of other users currently using the client

  • no_muted (bool, optional) – Avoid receiving (silent and invisible background) notifications. Useful to save battery.

Returns:

bool

TL Schema

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

= Bool

Parameter Tree

RegisterDevice
├── no_mutedtrue (optional)
├── token_typeint
├── tokenstring
├── app_sandboxBool
├── secretbytes
└── other_uidsVector < long >

Example

await app.invoke(
    RegisterDevice(
        no_muted=None,
        token_type=0,
        token="text",
        app_sandbox=True,
        secret=b"data",
        other_uids=[0],
    )
)