How to get the instance ID list of Firebase application via Web API?

旧时模样 提交于 2019-12-25 07:49:56

问题


I want to get a list of Registration Tokens from my Firebase application via Web API. How do I do it?

An example of what I was thinking, below.

Example POST request:

https://iid.googleapis.com/iid/foooooooooooooHowDoIt
Content-Type:application/json
Authorization:key=API_KEY
{
   "application": "com.iid.example_myapp"
}

Example result:

HTTP 200 OK
{
   "tokens": ["nKctODamlM4:CKrh_PC8kIb7O...", "1uoasi24:9jsjwuw..."],
}

Reference: https://developers.google.com/instance-id/reference/server


回答1:


There is currently no API available that retrieves all/specific registration tokens for an app.

From the docs:

After you've obtained the token, you can send it to your app server and store it using your preferred method.

It's not explicitly said in any of the documentations, but IMHO, it is the developer's responsibility to store the registration tokens on their own app server for later use.



来源:https://stackoverflow.com/questions/41994131/how-to-get-the-instance-id-list-of-firebase-application-via-web-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!