5

I've read on Google Firebase Docs:

Client apps can subscribe to any existing topic, or they can create a new topic.

So how can I can check how many existing topics are available for me? Is it only through the console? Or is there an API?

AL.
  • 36,815
  • 10
  • 142
  • 281
AnLT
  • 569
  • 8
  • 22
  • 2
    There is no public API to get a list of topics. See http://stackoverflow.com/questions/37874606/how-to-get-all-topics-list-of-firebase-through-api – Frank van Puffelen Sep 21 '16 at 19:09
  • 1
    There is api to list existing or available Topics. http://stackoverflow.com/questions/37987821/get-all-subscribed-topics-from-firebase-cloud-messaging – Krunal Goswami Nov 25 '16 at 13:16
  • Please take a look to my answer to a similar questions: https://stackoverflow.com/questions/38948720/is-there-anyway-to-access-the-firebase-topics-a-user-is-subscribed-to/47835894#47835894 – Eduardo Irias Dec 15 '17 at 20:34
  • Check the answer https://stackoverflow.com/questions/37987821/get-all-subscribed-topics-from-firebase-cloud-messaging/65301320#65301320 – Khalid Lakhani Dec 15 '20 at 07:07

1 Answers1

10

As already mentioned by @FrankvanPuffelen in the comments section, there is not available API to get a list of Topics you have.

What you could do is keep record of the topics you have created on your server side. So it pretty much depends on your own implementation.

Also, if you are thinking of checking the number of subscribers of a specific topic so you can see which ones are active or not, it's also not possible. See this answer by @ArthurThompson:

No. There is no current way to query the number of subscribers to a topic, you would have to maintain the relationship between token and topics on you app server.

Community
  • 1
  • 1
AL.
  • 36,815
  • 10
  • 142
  • 281