JoshuaTree
JoshuaTree

Reputation: 1261

Use GCM Token for push messages in FCM

Currently we have devices using old GCM implementation.

Does anyone know if it's possible to use old existing GCM tokens when sending push messages using firebase cloud messaging APIs?

Or would the apps require the new FCM sdk implementation?

Upvotes: 5

Views: 6180

Answers (3)

Rahil Ali
Rahil Ali

Reputation: 965

Yes we can use GCM token to push on FCM. See the below explanation:

Your GCM and FCM registration tokens are mutually interchangeable; you can send to existing GCM tokens through the FCM HTTP server APIs.

https://developers.google.com/cloud-messaging/faq

Upvotes: 0

j2emanue
j2emanue

Reputation: 62519

GCM token and firebase token are not the same. I did a test and subscribed to both services and saw that both tokens are different. you'll have to be very careful when using tokens to make sure. some 3rd party libraries still want to use GCM tokens while others are using firebase.

further, if you take a GCM token and try to use it in the firebase cloud messaging console to send a message, it might not be received by the android client. this was my case. i had to ensure i had a FCM token.

Upvotes: 0

Tim
Tim

Reputation: 43314

Does anyone know if it's possible to use old existing GCM tokens when sending push messages using firebase cloud messaging APIs?

Yeah that is possible. FCM and GCM messaging api are the same. The only thing that is different is the url (gcm-http.googleapis.com/gcm/ vs fcm.googleapis.com/fcm/) but they point to the same server.

Also see server endpoints documentation.

Upvotes: 8

Related Questions