Unsubscribe All Users From A Topic In FCM
Is there a way to unsubscribe all users from a topic in Firebase Cloud messaging without knowing the tokens? Basically, "delete" the topic?
It would be really really painful to do this manually since it should happen with a document change trigger, meaning the function would somehow have to know all the user tokens. So it's either a function/set of functions for "get all tokens for topic, then unsubscribe all of them", or "delete topic". Are there any solutions to this?
There is no API to unsubscribe all tokens from a specific topic. There also is no API to get a list of tokens for a topic. See How to get client FCM tokens from a FCM topic
Topics are automatically created and deleted by Firebase Cloud Messaging. A topic is created when you first subscribe a token to it, or send a message to it. And it's essentially deleted when you remove the last token from it.
- → How can I query Firebase for an equalTo boolean parameter?
- → How can I access nested data in Firebase with React?
- → Firebase simple blog (confused with security rules)
- → Removing item in Firebase with React, re-render returns item undefined
- → AngularJS Unknown Provider Error (Firebase & AngularFire)
- → How do you pass top level component state down to Routes using react-router?
- → "this" is null in firebase query function in reactjs
- → Angular Module Failed to Load
- → Multiple dex files define Lcom/google/android/gms/internal/zzrx;
- → Joining Firebase tables in React
- → How can I make add firepad to my reactjs project?
- → How to use Cloud Functions for Firebase to prerender pages for SEO?
- → React.js component has null state?