Firebase Topic Message Received Status using Googl

2019-02-15 14:54发布

Recently, I integrated the Firebase Topic concept in my APP and near to 2K users was subscribed and I', triggering notifications daily via my app server.

What I want to know is how many users are getting delivered and failed. Because if some users are not getting delivered and failed, I'll set a retry of the notification to those members again. Any ideas about this?

I also tried the following URL via ARC (Advanced Rest Client) for getting the information about all my topics in my current project with following API:

https://iid.googleapis.com/iid/info/APA91bHQ3Jp2NPrVF7z_1a8qNgg_YGI-
zPhnxnpumCeckvieHACuwaIWPlaR....QcChUOhk4T62vAc_0PC8HVk4p4D?details=true

Content-Type: application/json
Authorization: key=<SERVER_KEY> 

SERVER_KEY -> ( Firebase Console -> Settings -> Cloude message -> Legacy Server key )

But I am getting the response status:

400: Bad Request
{
"error": "InvalidTokenVersion"
}

Any idea to resolve this issue?

1条回答
甜甜的少女心
2楼-- · 2019-02-15 15:31

There is currently no available API that you can use in order to trace if a message has been received by the device when using Topics Messaging.

You'll have to implement your own way to somehow acknowledge that the message from the topic has been received by your client app, if it didn't receive it, then have your App Server do a retry.

On a side note, when using FCM, it is highly advised to make use of the Server Key instead of the Legacy Server Key.


With regards to the InvalidTokenVersion response. It seems that it is related to the registration token. I tried it out on my end and was able to replicate the response, but only when using a registration token with the old format (starts with APA with no colon ":").

But when I tested a token with the new format, it returned expected response. I'm fairly sure this has something to do with the registration token somehow.

查看更多
登录 后发表回答