如何通过Web API获取Firebase应用程序的实例ID列表? [英] How to get the instance ID list of Firebase application via Web API?

查看:130
本文介绍了如何通过Web API获取Firebase应用程序的实例ID列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过Web API从我的Firebase应用程序中获取注册令牌的列表.我该怎么办?

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.

示例POST请求:

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

示例结果:

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

参考: https://developers.google.com/instance-id/reference /服务器

推荐答案

当前没有可用的API可以检索应用程序的所有/特定注册令牌.

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

来自文档:

获取令牌后,可以将其发送到应用服务器并使用首选方法进行存储.

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.

这篇关于如何通过Web API获取Firebase应用程序的实例ID列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆