John H
John H

Reputation: 67

Have any solution for validate gcm token?

I have a api for register device with the server. In this api, the device must send gcmtoken to the server and server will save it to db. My problem is how to server know this gcmtoken has been generate from my app? Have any suggestion for validate a gcmtoken is generate from my app?

Upvotes: 0

Views: 388

Answers (1)

joarleymoraes
joarleymoraes

Reputation: 1949

You can send a test push notification to the newly received token, and check if it fails or not. If you don't want actually send the push notification to the client, use the option dry_run in your message option, which won't send the notification, but will check if the token is good. See more details here.

Upvotes: 3

Related Questions