How to get all topics list of Firebase through API?

前端 未结 4 419
暗喜
暗喜 2020-12-09 18:36

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.

4条回答
  •  北海茫月
    2020-12-09 19:14

    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

    https://iid.googleapis.com/iid/info/?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

提交回复
热议问题