How to get a list of all Firebase themes via API?

I want to get all the themes created so far through an API request, similar to the list displayed in the firebase console. See Attached Image.

enter image description here

+4
source share
4 answers

There is no public API to get a list of topics for Firebase Cloud Messaging

+4
source

I just copy the answer from the same question because this page is the first result on google: Get all signed topics from firebase cloud messages

you can do this with a GET request

HTTP GET Request

https://iid.googleapis.com/iid/info/<TOKEN>?details=true Content-Type:application/json Authorization:key=AIzaSyZ-1u...0GBYzPu7Udno5aA 

TOKEN in URL: FirebaseInstanceId.getInstance().getToken();

key : can be found in [firebase console] [1]: your project β†’ settings β†’ project settings β†’ cloud messaging β†’ server key

+2
source

I also have a requirement for the same use case. However, I just had to make my own list in the data warehouse and read about it. And do not forget that if I created a theme from the code, I can’t even see it until two hours on the console. Hopefully the API will post topics soon and also reduce the backlog by showing it on the console.

So, in cases where I can not see it on the console, I would really like to see a list of API themes

+1
source

Through this, I used the firebase database, first create a themes folder inside the database, and then add entries to this folder when the user creates a new theme.

Then you create a function in the application to retrieve all the records in this folder in the database.

Now you can allow the user to select an existing section from the database results, and then use it to call the subscription function.

Not a solid solution for everyone, but worked for me.

0
source

Source: https://habr.com/ru/post/1260471/


All Articles