muranaga
muranaga

Reputation: 3

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

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

Upvotes: 0

Views: 2026

Answers (1)

AL.
AL.

Reputation: 37798

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.

Upvotes: 1

Related Questions