Back

Support for multi-user pushTargert with same token

  • 0
  • Auth
  • Messaging
Ernest
8 Mar, 2025, 10:10

I'm working on an app that supports multiple logged-in users. That is, a user can add multiple accounts. Something akin to the image below. Only one user can be active at a time. I want to be able to send targeted push notifications to logged in accounts regardless of it being active or not.

However, this is currently not possible with the CreatePushTarget https://appwrite.io/docs/references/1.6.x/client-flutter/account#createPushTarget enpoint since it requires one and only one identifier (FCMToken) to be associated with an account.

I'm asking this in case I missed something in the docs or if anyone has a suggestion on how to get this working.

P. S. Currently, sending push notifications with a function calling FCM apis directly instead of using Appwrite Messaging api.

TL;DR
Developers need support for sending push notifications to multiple logged-in users in an app, each with unique accounts but sharing the same FCM token. The current `CreatePushTarget` endpoint only allows one identifier per account, making this task challenging. To work around this limitation, consider directly calling FCM APIs instead of using the Appwrite Messaging API.
Ernest
8 Mar, 2025, 10:11

Support for multi-user pushTargert with same token

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more