Deliver notifications with invalid token

57 views
Skip to first unread message

Emad Hosseini

unread,
Mar 7, 2017, 1:13:03 PM3/7/17
to android-gcm
I have asked this question in StackOverflow and I have been directed to ask this question again in this forum maybe you can help me.

I'm sending push notifications to android device using GCM service and the token that is sent by device. Everything is working well. Now if I change the device token and add an arbitrary string to the start of the token GCM still sends the notification. But if I add something to end of the token Google responds with error! Here is a successful token:

testen0xLucMNBo:APA91bEkZjKCUVT30O7J9OMZoUWmjdRb3jIFfRBwp62hgK3JEbJ20MlPvpKWXkQj8YMKuVHOyhNfRiG5Op1lh68iT_D_-81JhKXhLVYi1KrWx1Qu7L6WSnm9-oOhFHdKsmjo-qm_9Ana

Notice the test in the beginning of token. That's what I added.

And this is what google replies.

{"multicast_id":8394350681994886128,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1479811125743676%3595830d66d6cf16"}]}

Also I got a hint that the actual token happens after the "APA" part and now I'm wondering what the first part is?

Is it a normal behavior? Is there such a behavior specified in Google docs anywhere?

Diego Giorgini

unread,
Mar 7, 2017, 1:26:13 PM3/7/17
to android-gcm
The first part of the token is the InstanceID-ID. see InstanceID.getInstance().getId()
That part is not essential for authorization, this is why you can change it.
That said please treat the token as an opaque string.
We might start to enforce the match of first part, or we could change the format in the future.

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/a6e5ffea-0a1a-45af-9025-d3952d5ea080%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Emad Hosseini

unread,
Mar 8, 2017, 1:37:55 AM3/8/17
to android-gcm
Actually I treated the token as opaque string but the problem is you don't! And that caused me more than 10,000 gibberish notifications.

Massimiliano

unread,
May 1, 2024, 8:19:01 PMMay 1
to android-gcm
MT103/202 DIRECT WIRE TRANSFER
PAYPAL TRANSFER
CASHAPP TRANSFER
ZELLE TRANSFER
LOAN DEAL
TRANSFER WISE
WESTERN UNION TRANSFER
BITCOIN FLASHING
BANK ACCOUNT LOADING/FLASHING
IBAN TO IBAN TRANSFER
MONEYGRAM TRANSFER
IPIP/DTC
SLBC PROVIDER
CREDIT CARD TOP UP
DUMPS/ PINS
SEPA TRANSFER
WIRE TRANSFER
BITCOIN TOP UP
GLOBALPAY INC US
SKRILL USA
UNIONPAY RECEIVER

Thanks.


NOTE; ONLY SERIOUS / RELIABLE RECEIVERS CAN CONTACT.

DM ME ON WHATSAPP
+44 7529 555638
Reply all
Reply to author
Forward
0 new messages