Search code examples
firebasefirebase-cloud-messaging

Validate the FCM Tokens at server side firebase using curl?


I want to validate the FCM Tokens like 500 FCM tokens. I know how to validate single fcm token using below api :-

https://iid.googleapis.com/iid/info/nKctODamlM4:CKrh_PC8kIb7O...clJONHoA?details=tru
Content-Type:application/json
Authorization: Bearer ya29.ElqKBGN2Ri_Uz...HnS_uNreA
access_token_auth: true

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

Now assume i have 500 FCM tokesn to validate in one go. i dont need to run 500 times curl request to validate each and every token. Is there any way to do validate multiple FCM tokens in one go. if yes please help me on that. Thanks


Solution

  • This can be scripted eg. with firebase-php, while the API accepts chunks of 500 tokens each.

    You'd need to implement interface Messaging to do so.