Example: User-User Messages

How to use OneSignal for user-to-user messages.

๐Ÿšง

Push Notifications are Not designed for live chat.

Push Notifications are best used as a fallback when both users are not active on your app.

Tools dedicated to Live Chat functionality include:

If your app uses private or direct messaging and you want to display a push notification alerting a user that a message was sent to them you may want to consider using one of the above technologies. OneSignal is best used for marketing or Transactional Messages from your company to user.

That being said, it is possible to setup User-to-User Push Notifications through OneSignal following these steps.

1. Set the External ID

You should use OneSignal's Aliases & External ID to match your records of users with users in OneSignal.

2. Send the Message From our API

After users are matched between your database and OneSignal, you can send a message with our API Create notification method using the include_external_user_ids or other alias.


Whatโ€™s Next

Create an activity feed to show the notifications sent within your mobile app