Push Notifications

When Chatkit users miss a private message, they can receive it as a push notification. The message will appear as a push notification on their lock screen for iOS/Android applications or from their web browser. They can use these push notifications to launch the application or web browser tab and return to the conversation.

Delivery Criteria

Chatkit push notifications rely on Chatkit presence to determine who should receive push notifications.

When a Chatkit user sends a message to another user — either in a private room with many users or just 1-1 — the Chatkit push notifications service checks whether the recipients are online.

If users in the private room are not online, a push notification is sent after 4 seconds. Another push notification is sent for each subsequent missed message. The iOS and Android operating systems will stack these notifications into a batch on the user’s lock screen.

Notification Payload

The push notification payload combines fields which are determined by the operating system/browser with content from the Chatkit service.

Each push notification sent to Chatkit users includes:

  • app name — the name of your application (iOS/Android only)
  • app icon — the icon for your application
  • Chatkit room name — the name of the private room where the missed message occurred, as defined by your running Chatkit service
  • Chatkit message body — the first message part of type text/plain from the missed message, automatically truncated with an … at 140 characters to adhere to operating system limits.
  • Chatkit does not currently send media attachments in push notifications. If a message does not have an inline part of type text/plain then we will not send a notification for that message.

    Device Registration

    Chatkit push notifications are only enabled for devices which register to receive push notifications from your app.

    If a user has already authorized push notifications for your app, the Chatkit client SDK will pass this device token to Chatkit once you follow the appropriate platform setup guide and a user updates their app to your latest version.

    If a user has not yet authorized push notifications from your app, the Chatkit client SDK will trigger a system prompt once your have followed the platform setup guide and a user updates their app to your latest version.

    If a user opts out of receiving push notifications from your app, they will not receive Chatkit push notifications until they go to their iOS, Android, or browser settings and opt back in to receive push notifications from your app.

    Customizing Notifications

    Please see the guide on Customizing Push Notifications to learn how to change the content of Chatkit push notifications to suit your specific use case.

    Configuring Notifications

    In order to start sending Chatkit push notifications, follow the iOS, Android, or Web guide. Setup is just a few steps in the dashboard and in your code.