account.RegisterDevice
- class pyrogram.raw.functions.account.RegisterDevice
Register device to receive PUSH notifications
- Details:
Layer:
223ID:
EC86017A
- Parameters:
token_type (
int32-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 notificationsother_uids (List of
int64-bit) – List of user identifiers of other users currently using the clientno_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_muted →
true (optional)├── token_type →
int├── token →
string├── app_sandbox →
Bool├── secret →
bytes└── other_uids →
Vector < long >Example
await app.invoke(
RegisterDevice(
no_muted=None,
token_type=0,
token="text",
app_sandbox=True,
secret=b"data",
other_uids=[0],
)
)