How to delete a topic from Firebase Console? (FCM)

12,133

There is no way to delete a topic directly. Not even if you have an app server. That's what I can say after going through the GCM and FCM documents.

The way I understand it, a topic is created when there is at least 1 subscriber and it also gets automatically deleted when there are no more subscribers. So I think the way to do this is to unsubscribe all the subscribers of that topic.

You can check more details on unsubscribing in the Managing Topic Subscriptions on the Server docs (both sites below pretty much says the same thing, but I think it's appropriate to provide a link to both of them):

Hope this helps somehow. Cheers! :)

Share:
12,133

Related videos on Youtube

Vkay
Author by

Vkay

Be your own customer ^^

Updated on June 06, 2022

Comments

  • Vkay
    Vkay almost 2 years

    Does anyone know how to delete a client topic from the Firebase Console?

  • Gillis Haasnoot
    Gillis Haasnoot about 5 years
    What if you don't know all subscribers? In our case old topics can be removed, because no messages are send ever again. But we don't keep our own list of subscribed users to that topic. After all that is one benefit of FCM over GCM. I heard that there is a max of 2000 subscribed topics per user. So if you are not tracking each invidual topic per user and reaching the 2000 limit. What is happening and how to solve this?
  • AL.
    AL. about 5 years
    I presume you found the 2000 limit here. Like what I mentioned in my comment, there isn't any official document that states that limit -- if you want to make sure that the limit is still (?) 2000, I suggest doing a test of your own. I haven't experienced reaching the limit (I can't even imagine having a single token subscribed to that many), but it says on the post that you will receive an error. There is currently no way to delete a topic, the only solution right now is to keep track of the subscription (either by topic or by user).
  • Gillis Haasnoot
    Gillis Haasnoot about 5 years
    In our case users can subscribe on upcoming sports events. After a year of using the app many users have subscribed to over 2000 topics. Of course from which 90% is no longer used since they are all old events. Thats the reason why I simply want to remove all users from a specific topic. Very annoying that this feature is not available.
  • Shobhit Mishra
    Shobhit Mishra almost 5 years
    In my case I just want to make sure message to particular user is not sent twice until he subscribes again also in my case, subscribing and sending message to topic are distributed processes hence at time of sending I don't have user's records to unsubscribe.
  • Shashank Shah
    Shashank Shah over 3 years
    @AL. The behaviour you have mentioned is no happening to me. I have created a topic and I have unsubscribed all the users from the created topic still the topic exist over the firebase and not deleted automatically though I did not get any notifications after unsubscribe ( which is right behaviour). When there are no subscribers the topic still remain same as it is.
  • AL.
    AL. over 3 years
    @ShashankShah The topics listed on the Firebase console don't update realtime. Give it about 24-48 hours