Push Notifications
Push notifications are used to notify users of events that occur in the background, such as incoming messages or calls.
After authenticating, a mobile client can register a device push notification token with the server using the Register Device endpoint. This token is then used to send push notifications to the client's device.
Registering Tokens
A client registers its device's token with the Register Device endpoint, or with Sync Devices when several accounts share the device. It also keeps the token it was given by the operating system, and attaches it to requests that provision a new authentication token, so the device stays registered across the change without a second round trip.
Currently, these endpoints are Modify Current User and Reset Password.
Push Notification Provider
| Value | Description |
|---|---|
| gcm | Firebase Cloud Messaging (Android) |
| meta_horizon | Meta Horizon OS push notifications (Meta Quest) |
| apns | Apple Push Notification Service (iOS) |
| apns_internal | Apple Push Notification Service (iOS internal) |
| apns_local 1 | Apple Push Notification Service (iOS local) |
| apns_voip 2 | VOIP Apple Push Notification Service (iOS) |
| apns_internal_voip 2 | VOIP Apple Push Notification Service (iOS internal) |
| apns_local_voip 1 2 | VOIP Apple Push Notification Service (iOS local) |
1 Local providers are only used by locally-built clients, identified by a com.hammerandchisel.discord.local bundle ID prefix.
2 VOIP-specific push notification providers are used to provide rich notifications for VOIP calls on iOS.
Push Notification Payloads
Push notifications are delivered as data-only messages. The payload carries the entities the event concerns, and the client renders, groups, and routes the notification itself. Which fields are present depends on the type of push notification.
On iOS, the payload's fields are sent as top-level siblings of the standard APNs aps dictionary. On Android, they are sent as an FCM data message; there is no notification block, so notifications are always rendered by the client rather than by the system.
Only type is guaranteed to be present. Every other field is optional, and a client that receives a type it does not recognize is expected to ignore the notification.
The fields belonging to a notification's type are sent alongside the ones below rather than nested in an object of their own.
Push Notification Structure
| Field | Type | Description |
|---|---|---|
| type | string | The type of push notification |
| receiving_user_id? 1 | snowflake | The ID of the user the notification is intended for |
| notif_type_id? | integer | The type of notification that produced the push notification |
| notif_instance_id? | string | The ID of this specific delivery of the notification |
| tracking_type? | string | The tracking type the notification is reported under in analytics |
| notification_channel? (deprecated) 2 | string | The notification channel the notification belongs to |
| title? | string | The title to display, overriding the one the client would derive |
| subtitle? | string | The subtitle to display |
| expand_subtitle? | boolean | Whether the subtitle should be displayed expanded (default false) |
| icon_url? | string | The URL of the icon to display |
| silent? | boolean | Whether the notification should be delivered without alerting the user (default false) |
| sent_at_ms? 3 | integer | Unix timestamp (in milliseconds) of when the notification was sent |
| channel_ids? | array[snowflake] | The IDs of the channels the notification acknowledges |
| mention_type? | string | The type of mention that triggered the notification, used for analytics |
| join_id? | string | An opaque identifier reported alongside the notification in analytics |
1 Used on devices with multiple accounts logged in. The client switches to this account before acting on the notification. See Sync Devices for more information.
2 Android only. Modern clients derive the notification channel from notif_type_id instead; see notification channels.
3 Used as the last acknowledged timestamp when a notification acknowledges channels. Clients that do not receive this field fall back to the time the push was sent.
Push Notification Type
| Value | Description | Extra Data |
|---|---|---|
| MESSAGE_CREATE | A message was sent in a channel the user is notified about | message create object |
| FORUM_THREAD_CREATED | A thread was created in a forum channel the user is notified about | forum thread created object |
| RELATIONSHIP_ADD | A relationship with the user was created | relationship add object |
| FRIEND_SUGGESTION_CREATE | A friend suggestion was created for the user | friend suggestion create object |
| CALL_RING | The user is being rung in a call | call ring object |
| CALL_RING_END 1 | The user is no longer being rung in a call | — |
| CALL_ACK 1 | The call the user was being rung in was answered elsewhere | — |
| CALL_CONNECT | The user should join a call | call connect object |
| CHANNEL_ACK 1 | Channels were read elsewhere | — |
| ACTIVITY_START | A friend started an activity | activity start object |
| APPLICATION_LIBRARY_INSTALL_COMPLETE | An application finished installing | application library install complete object |
| STAGE_INSTANCE_CREATE | A stage instance the user is notified about was created | stage instance create object |
| GUILD_SCHEDULED_EVENT_UPDATE | A guild scheduled event the user is interested in started | guild scheduled event update object |
| GUILD_STREAM_START | A user started streaming in a guild the user is notified about | guild stream start object |
| GENERIC_PUSH_NOTIFICATION_SENT 2 | A notification with no dedicated payload was sent | generic push notification object |
1 These types retract notifications instead of displaying one; see acknowledging notifications.
2 This is used for notification types that have no dedicated handling in the client.
Message Create Structure
| Field | Type | Description |
|---|---|---|
| message? 1 | partial message object | The message that was sent |
| message_id | snowflake | The ID of the message that was sent |
| message_type_ | integer | The type of message that was sent |
| message_content | string | The content of the message |
| message_flags? | integer | The message's flags |
| message_reference_type? | integer | The type of reference on the message |
| message_activity_type? | integer | The type of activity request in the message |
| message_application_name? | string | The name of the application attached to the message |
| channel_id | snowflake | The ID of the channel the message was sent in |
| channel_type | integer | The type of channel the message was sent in |
| channel_name | string | The name of the channel the message was sent in |
| channel_icon? | ?string | The group DM's icon hash |
| is_spoiler_channel? | boolean | Whether the channel is a spoiler channel, meaning contents should be hidden until the notification is opened (default false) |
| app_dm? | boolean | Whether the channel is a DM with an application (default false) |
| guild_id? | snowflake | The ID of the guild the message was sent in |
| guild_name? | string | The name of the guild the message was sent in |
| guild_icon? | ?string | The guild's icon hash |
| user_id | snowflake | The ID of the message's author |
| user_username | string | The username of the message's author |
| user_global_name? | ?string | The display name of the message's author |
| user_discriminator? | ?integer | The author's discriminator |
| user_avatar? | ?string | The author's avatar hash |
| user_guild_avatar? | ?string | The author's guild avatar hash |
| is_from_current_user? | boolean | Whether the message was sent by the receiving user (default false) |
| __category? | string | Whether the notification can be replied to inline (value of can_reply) |
| poll_question? | string | The question of the poll attached to the message |
| image_url? | string | The URL of the message's image attachment |
| image_url_ergo_android? | string | The URL of the message's image attachment, sized for Android |
| image_count? | integer | The number of image attachments on the message |
| video_count? | integer | The number of video attachments on the message |
| attachment_text_variant? | integer | The attachment summary to display in place of the message's content |
| invite_guild_name? 2 | string | The name of the guild the message invites the user to |
| invite_channel_name? 2 | string | The name of the channel the message invites the user to |
| invite_title_variant? 2 | integer | The invite title to display in place of the author's name |
1 Contains only the author, mentions, embeds, components, sticker_items, and poll fields.
2 Only sent for messages in a DM that invite the user to a guild.
Attachment Text Variant
Sent when the message's own content should not be shown.
| Value | Name | Description |
|---|---|---|
| 1 | SENT_AN_IMAGE | The message has a single image attachment |
| 2 | SENT_IMAGES | The message has several image attachments, counted by image_count |
| 3 | SENT_A_GIF | The message has a GIF attachment |
| 4 | SENT_A_VIDEO | The message has a single video attachment |
| 5 | SENT_VIDEOS | The message has several video attachments, counted by video_count |
Invite Title Variant
| Value | Name | Description |
|---|---|---|
| 1 | SENDER_ONLY | Titled as an invite from the message's author |
| 2 | EMOJI | Titled as an invite from the message's author, with an emoji |
Forum Thread Created Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the thread that was created |
| channel_name | string | The name of the thread that was created |
| parent_id | snowflake | The ID of the forum channel the thread was created in |
| parent_name | string | The name of the forum channel the thread was created in |
| user_id | snowflake | The ID of the user who created the thread |
| user_username | string | The username of the user who created the thread |
| user_avatar? | ?string | The user's avatar hash |
| user_guild_avatar? | ?string | The user's guild avatar hash |
| user_discriminator? | ?integer | The user's discriminator |
| guild_id? | snowflake | The ID of the guild the thread was created in |
| guild_name? | string | The name of the guild the thread was created in |
| guild_icon? | ?string | The guild's icon hash |
Relationship Add Structure
| Field | Type | Description |
|---|---|---|
| rel_type | integer | The type of relationship that was created |
| user_id | snowflake | The ID of the user the relationship is with |
| user_username | string | The username of the user the relationship is with |
| user_global_name? | ?string | The display name of the user the relationship is with |
| user_avatar? | ?string | The user's avatar hash |
| notification_type? | string | The tracking type of the reminder that produced the notification |
| since? | ISO8601 timestamp | When the relationship was created |
Friend Suggestion Create Structure
| Field | Type | Description |
|---|---|---|
| user_id | snowflake | The ID of the suggested user |
| user_username | string | The username of the suggested user |
| user_avatar? | ?string | The suggested user's avatar hash |
| platform_type | string | The type of connection the suggestion is from |
| platform_name? | ?string | The name of the connection the suggestion is from |
| platform_user_username | string | The username of the suggested user on the connected account |
Call Ring Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel the call is in |
| channel_type | integer | The type of channel the call is in |
| channel_name | string | The name of the channel the call is in |
| channel_icon? | ?string | The channel's icon hash |
| rtc_region? | ?string | The voice region the call is hosted in |
| user_id | snowflake | The ID of the user who is ringing |
| user_username | string | The username of the user who is ringing |
| user_avatar? | ?string | The ringing user's avatar hash |
Call Connect Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel to join |
| guild_id? | snowflake | The ID of the guild the channel is in |
| user_id? | snowflake | The ID of the user who rang |
| is_fullscreen_call_ui? 1 | boolean | Whether the call was answered from the system's full-screen call UI (default false) |
1 Android only.
Activity Start Structure
| Field | Type | Description |
|---|---|---|
| activity_type | integer | The type of activity that was started |
| activity_name | string | The name of the activity that was started |
| activity_instance_id? | string | The composite ID of the launched activity instance |
| application_id? | snowflake | The ID of the application the activity belongs to |
| application_name? | string | The name of the application the activity belongs to |
| application_icon? | ?string | The application's icon hash |
| user_id? | snowflake | The ID of the user who started the activity |
| user_username? | string | The username of the user who started the activity |
| user_avatar? | ?string | The user's avatar hash |
Application Library Install Complete Structure
| Field | Type | Description |
|---|---|---|
| application_id | snowflake | The ID of the application that finished installing |
| application_name | string | The name of the application that finished installing |
| application_icon? | ?string | The application's icon hash |
Stage Instance Create Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the stage channel |
| guild_id | snowflake | The ID of the guild the stage channel is in |
| stage_instance_topic? | string | The topic of the stage instance |
Guild Stream Start Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel being streamed in |
| guild_id | snowflake | The ID of the guild the channel is in |
| user_id | snowflake | The ID of the user who started streaming |
Guild Scheduled Event Update Structure
| Field | Type | Description |
|---|---|---|
| guild_scheduled_event_id | snowflake | The ID of the guild scheduled event |
| guild_scheduled_event_entity_type | integer | The type of entity the event is hosted at |
| guild_id | snowflake | The ID of the guild the event is in |
| channel_id? 1 | snowflake | The ID of the channel the event is hosted in |
| channel_name? | string | The name of the channel the event is hosted in |
| channel_type? | integer | The type of channel the event is hosted in |
| guild_scheduled_event_entity_id? | snowflake | The ID of the entity the event is hosted at |
| guild_scheduled_event_entity_name? | string | The name of the entity the event is hosted at |
| guild_name? | string | The name of the guild the event is in |
| guild_icon? | ?string | The guild's icon hash |
1 Always present for events with a STAGE_INSTANCE or VOICE entity type. Clients ignore events hosted at any other kind of entity.
Generic Push Notification Structure
| Field | Type | Description |
|---|---|---|
| notification_type? | string | The type of notification that produced the push notification |
| deeplink? 1 | string | The deep link to open when the notification is tapped |
| notification_id? | string | The ID of the notification |
| notification_center_id? | snowflake | The ID of the notification center item the notification was created from |
| guild_id? | snowflake | The ID of the guild the notification concerns |
| channel_id? | snowflake | The ID of the channel the notification concerns |
| message_id? | snowflake | The ID of the message the notification concerns |
| user_id? | snowflake | The ID of the user the notification concerns |
| status_text? 2 | string | The custom status text of the user the notification concerns |
| status_emoji_id? 2 3 | ?snowflake | The ID of the custom emoji in the user's custom status |
| status_emoji_name? 2 | ?string | The unicode character of the emoji in the user's custom status |
| status_emoji_animated? 2 | boolean | Whether the emoji in the user's custom status is animated (default false) |
1 Deep links are a URL using either the discord:// protocol or a Discord hostname.
2 Only sent with ICYMI_SUMMARY notifications.
3 A value of 0 should be treated the same as a null value.
Notification Type
Every notification Discord can send has a type, independent of the push notification type used to deliver it. It is sent as notif_type_id,
and determines which notification channel the notification is posted to and which user notification settings suppress it.
Types with no dedicated handling in the client are delivered as GENERIC_PUSH_NOTIFICATION_SENT push notifications, which name their type in notification_type instead.
| Value | Name | Description |
|---|---|---|
| 1 | MESSAGE_CREATE | A message was sent |
| 2 | CALL_RING | The user is being rung in a call |
| 3 | RELATIONSHIP_ADD | A relationship with the user was created |
| 4 | FRIEND_SUGGESTION_CREATE | A friend suggestion was created for the user |
| 5 | APPLICATION_LIBRARY_INSTALL_COMPLETE | An application finished installing |
| 6 | GUILD_STREAM_START | A user started streaming in a guild |
| 7 | STAGE_INSTANCE_CREATE | A stage instance was created |
| 8 | GUILD_SCHEDULED_EVENT_UPDATE | A guild scheduled event started |
| 9 | FORUM_THREAD_CREATED | A thread was created in a forum channel |
| 10 | TOP_MESSAGES_PUSH | A digest of top messages from a frequently read guild |
| 11 | MISSED_MESSAGE_PUSH | Missed messages from a frequently read channel |
| 13 | FRIEND_REQUEST_REMINDER_PUSH | A reminder about pending friend requests |
| 14 | HOME_LIFECYCLE_PUSH | A new user tutorial item |
| 15 | POLL_ENDED_PUSH | A poll the user participated in ended |
| 16 | NUDGE_NEW_FRIEND_DM_PUSH | A reminder to message a new friend |
| 17 | FAMILY_CENTER_REQUEST_SEND | A family center link request was sent |
| 18 | FAMILY_CENTER_REQUEST_ACCEPTED | A family center link request was accepted |
| 19 | FAMILY_CENTER_REQUEST_DECLINED | A family center link request was declined |
| 20 | FAMILY_CENTER_DISCONNECTED | A family center link was disconnected |
| 21 | GUILD_JOIN_REQUEST_APPROVED | A guild join request was approved |
| 22 | GUILD_JOIN_REQUEST_REJECTED | A guild join request was rejected |
| 23 | REACTIONS_PUSH_NOTIFICATION | A reaction was added to the user's message |
| 24 | RAID_DETECTED | A raid was detected in a guild the user moderates |
| 25 | MENTION_RAID_DETECTED | A mention raid was detected in a guild the user moderates |
| 26 | DM_SPAM_DETECTED | DM spam was detected in a guild the user moderates |
| 27 | SUSPICIOUS_SESSION | A suspicious session was detected on the user's account |
| 28 | NEW_USER_SESSION | A new session was started on the user's account |
| 29 | MESSAGE_REMINDER_DUE | A message reminder the user set is due |
| 30 | ICYMI_SUMMARY | A summary of activity the user missed |
| 31 | CHANNEL_PROMPT_DEADCHAT | A prompt to revive an inactive channel |
| 32 | REACTION_TRENDING_PUSH_NOTIFICATION | A reaction on the user's message is trending |
| 33 | SUMMONS_DIRECT | Unknown |
| 34 | ADMIN_NOTIFICATION_PUSH | A notification sent by a guild's administrators |
| 35 | VOICE_CHANNEL_ACTIVITY | Friends are active in a voice channel |
| 36 | MISSED_MESSAGE_EMAIL 1 | Missed messages from a frequently read channel |
| 37 | CUSTOM_STATUS_UPDATE | A friend updated their custom status |
| 38 | GO_LIVE_NOTIFICATION | A friend started streaming |
| 39 | FRIEND_GAMING_ACTIVITY_PUSH | A friend started playing a game |
| 41 | FRIEND_ONLINE_PUSH | A friend came online |
| 42 | INVITE_REMINDER_PUSH | Unknown |
| 43 | SERVER_TRENDING_NOTIFICATION | A guild is trending |
| 44 | MESSAGE_PIN | A message was pinned |
| 45 | PROFILE_UPDATES_NOTIFICATION | A friend updated their profile |
| 46 | SUMMARY_REMINDER | A reminder about a recent conversation summary |
| 47 | TRIAL_FOR_ALL_REMINDER | A reminder about an on-going trial promotion |
| 48 | FRIENDS_PLAYING_GAME | Friends are playing a game |
| 49 | REFERRAL_PROGRAM_PUSH_NOTIF_ENTRYPOINT_REMINDER | A reminder about the referral program |
| 50 | REFERRAL_PROGRAM_NOTIF_CENTER_ENTRYPOINT_REMINDER | A notification center reminder about the referral program |
| 51 | GAME_UPDATE | One of the user's games was updated |
| 52 | VOICE_CHANNEL_INVITE | The user was invited to a voice channel |
| 53 | GUILD_SCHEDULED_EVENT_UPCOMING | A guild scheduled event is starting soon |
| 54 | FAMILY_CENTER_RESTRICTED_SCHEDULE_UPDATED | A family center restricted schedule was updated |
| 55 | VOICE_CHANNEL_ACTIVITY_PEAK_AFFINITY | The user's closest friends are active in a voice channel |
| 56 | PARENTAL_CONSENT_FINAL_WARNING | A final warning about outstanding parental consent |
| 57 | MESSAGE_REQUEST | The user received a message request |
| 58 | FRIENDS_PLAYING_TRENDING_GAME | Friends are playing a trending game |
1 Delivered by email rather than as a push notification.
Tracking Type
| Value | Description |
|---|---|
| generic_friend_request_reminder | A reminder about pending friend requests |
| generic_home_featured_message | A featured message from a guild's home feed |
| generic_missed_message | Missed messages from a frequently read channel |
| GUILD_STREAM_START | A user started streaming in a guild |
| home_lifecycle_push | A new user tutorial item |
| new_user_session | A new session was started on the user's account |
| nudge_new_friend_dm_push | A reminder to message a new friend |
| poll_ended | A poll the user participated in ended |
| reactions_push_notification | A reaction was added to the user's message |
| reminder | A reminder about pending friend requests |
| suspicious_session | A suspicious session was detected |
| top_messages_push | A digest of top messages |
| trending_content_push | A digest of trending content |
Example Push Notification
{ "aps": { "alert": { "title": "general (My Cool Server)", "body": "hey, are you around?" }, "sound": "default", "badge": 3 }, "type": "MESSAGE_CREATE", "notif_type_id": "1", "notif_instance_id": "1536922843542192241", "sent_at_ms": "1786502869340", "channel_id": "1029315212521771020", "channel_type": "0", "channel_name": "general", "guild_id": "1029315212005888060", "guild_name": "My Cool Server", "guild_icon": "546242649e3b09a97af7e8f29983837b", "message_id": "1536922843542192240", "message_type_": "0", "message_content": "hey, are you around?", "user_id": "852892297661906993", "user_username": "dolfies", "user_global_name": "Dolfies", "user_avatar": "14733482e560d9267c0a414b21b2fb8d", "__category": "can_reply"}Acknowledging Notifications
Discord retracts notifications it has already sent by sending another push notification. These types never display anything:
CHANNEL_ACK: the channels inchannel_idswere read on another deviceCALL_ACK: the call in the channels inchannel_idswas answered on another deviceCALL_RING_END: the user is no longer being rung in the channels inchannel_ids
sent_at_ms is the acknowledgement time. Clients should convert it to a snowflake and dismiss the notifications for each acknowledged channel whose newest message is older than it,
leaving anything that arrived after the acknowledgement was sent in place. A notification the user has already replied to inline is kept and re-rendered as replied rather than dismissed.
CALL_RING_END is handled differently: rather than being dismissed, the ringing notification is replaced with a silent missed call notification.
Notification Channels
Android requires every notification to be posted to a notification channel, which the user can configure or disable individually. Channels are gathered into groups in the system settings UI.
Clients register the channels below with the operating system on startup, and pick one for each notification from its notif_type_id.
Notification Channel
| Value | Group | Importance | Description |
|---|---|---|---|
| calls 1 | 111_realtime | 4 | Incoming calls |
| mediaConnections | 111_realtime | 3 | Voice connected |
| gameDetection | 111_realtime | 1 | Game detection |
| directMessages | 222_social | 4 | Direct messages |
| friendRequests | 222_social | 4 | Friend requests |
| reactions | 222_social | 3 | Reactions |
| polls | 222_social | 3 | Polls |
| social | 222_social | 2 | Social |
| messages | 333_server | 4 | Messages |
| forumThreadCreated | 333_server | 4 | Forum notifications |
| guildEventLive | 333_server | 4 | Event notifications |
| guildHighlights | 333_server | 4 | Server highlights |
| stageLive | 333_server | 4 | Stage notifications |
| other | 333_server | 2 | Other server notifications |
| systemMessages | 444_other | 4 | Discord system messages |
| otherHighPriority | 444_other | 4 | Other (high priority) |
| default | 444_other | 2 | Other |
1 Clients that support custom call ringtones register one channel per ringtone, named calls_{ringtone} (i.e. calls_default and calls_halloween).
Notification Channel Group
| Value | Description |
|---|---|
| 111_realtime | Real-time |
| 222_social | Friends and DMs |
| 333_server | Guilds |
| 444_other | Everything else |
Default Notification Channel Mapping
| Notification type | Channel |
|---|---|
| 1 | directMessages in DMs, messages in guilds |
| 3 | friendRequests |
| 4, 6, 13, 16 | social |
| 7 | stageLive |
| 8 | guildEventLive |
| 9 | forumThreadCreated |
| 10, 11, 14 | other |
| 15 | polls |
| 23 | reactions |
| 27, 28 | systemMessages |
| Anything else | default |
CALL_RING and CALL_RING_END push notifications are always posted to the call channel, regardless of their notification type.
VOIP Notifications
Incoming calls on iOS are delivered over PushKit rather than APNs, so the system's native call UI can be presented before the app is running. These notifications use a payload of their own, unrelated to the one above.
VOIP Push Notification Structure
| Field | Type | Description |
|---|---|---|
| id | string | The UUID of the call, used as the CallKit call identifier |
| type | string | The type of VOIP push notification |
| channel_id | snowflake | The ID of the channel the call is in |
| user_id | snowflake | The ID of the user who is ringing |
| native_phone_name | string | The caller name to display in the system call UI |
VOIP Push Notification Type
| Value | Description |
|---|---|
| CALL_RING | The user is being rung in a call |
| CALL_RING_END | The user is no longer being rung |
Clients register the call with the system as discord:{channel.id}.{channel.type}.{recipient.id} for DMs, and discord:{channel.id}.{channel.type}.{guild.id} otherwise.
Endpoints
Register Device
POST/users/@me/devicesRegisters an FCM/APNs push notification token for the client's device. Returns a 204 empty response on success.
JSON Params
| Field | Type | Description |
|---|---|---|
| provider | string | The push notification provider of the device |
| token | string | The push notification token to register |
| voip_provider? 1 | string | The VOIP push notification provider of the device |
| voip_token? 1 | string | The VOIP push notification token to register |
| bypass_server_throttling_supported? | boolean | Whether the client supports bypassing server throttling for push notifications (default false) |
| bundle_id? | string | The bundle ID of the app (default com.discord) |
1 VOIP-specific push notification tokens are only used with PushKit on iOS.
Unregister Device
DELETE/users/@me/devicesUnregisters an FCM/APNs push notification token for the client's device. Returns a 204 empty response on success.
JSON Params
| Field | Type | Description |
|---|---|---|
| provider | string | The push notification provider of the device |
| token | string | The push notification token to unregister |
Get Device Sync Token
GET/users/@me/devices/sync-tokenReturns a push notification sync token for the current user. This token can be used to synchronize push notification tokens across multiple accounts.
Response Body
| Field | Type | Description |
|---|---|---|
| token | string | The push notification sync token |
Example Response
{ "token": "ODUyODkyMjk3NjYxOTA2OTkz.ZfoufA.rHvCtpfHjr9kdRab1ZTl83PRhhZ" }Sync Devices
PUT/users/@me/devices/syncSynchronizes the client's FCM/APNs push notification token across multiple accounts.
JSON Params
| Field | Type | Description |
|---|---|---|
| provider | string | The push notification provider of the device |
| token | string | The device push notification token |
| push_sync_tokens 1 | array[string] | Device sync tokens for each account |
1 A device sync token can be obtained for each account using the Get Device Sync Token endpoint.
Response Body
| Field | Type | Description |
|---|---|---|
| invalid_push_sync_tokens | array[string] | Device sync tokens that are invalid |
Example Response
{ "invalid_push_sync_tokens": ["ODUyODkyMjk3NjYxOTA2OTkz.ZfoufA.rHvCtpfHjr9kdRab1ZTl83PRhhZ"] }