I want to retrieve all the topics created so far via API request, similar to the list that firebase console display. See the image attached.
相关问题
- adding sha1 in firebase app fails with error
- firebase storage cors strange Behaviour
- Firebase security rules difference between get() a
- LoginActivty with Firebase & Facebook authenticati
- How to add working directory to deployment in GitH
相关文章
- How can make folder with Firebase Cloud Functions
- Firestore Update a document field Using Rest API
- How to convert a FCM token to APNS token?
- App not showing Notification receiving FCM when th
- Android Studio - Get Firebase token from GetIdToke
- How to combine Firestore orderBy desc with startAf
- Remove Duplicates from an Array of GeoFire Objects
- Is it possible to test a Firebase trigger locally?
I too have a requirement for the exact same use case, However, I had to just make my own list in a datastore and read off of that. And not to forget that if I created a topic from code, I can't even see it until a couple of hours on the console. Hope there is an API soon to list topics and also decrease the lag in showing it on console.
So in cases where I can't really see it on console, I would have loved to see the list of topics API
There is no public API to get the list of topics for Firebase Cloud Messaging
I just copy Answer from same question here becuase this page is first result in google: Get all subscribed topics from firebase cloud messaging
you can do it through a GET request
HTTP GET Request
TOKEN in url :
FirebaseInstanceId.getInstance().getToken();
key : can be found in [firebase console][1]: Your project -> settings -> Project settings -> Cloud messaging -> Server Key
The way I got around this was using the firebase database, first create a topics folder inside the database, then add entries into this folder when a user creates a new topic.
You then create a function within the app to retrieve all entries in this folder within the database.
Now you can allow the user to select a pre existing topic from the results of the database and then use that to call your subscribe function.
Not a solid solution for all but worked for me.