push-receiver icon indicating copy to clipboard operation
push-receiver copied to clipboard

C2DM Register API still supported by Google ?

Open senthil5053 opened this issue 4 years ago • 7 comments

In the source code, I see that c2dm register api url (https://android.clients.google.com/c2dm/register3) is being used in src/gcm/index.js. I know Google shut down C2DM long back in 2015. Can anybody share me with the details on how this is still supported by Google ? Will Google continue to support this in coming years ?

senthil5053 avatar Dec 30 '20 21:12 senthil5053

I think behind the scenes, Google may keep using some "c2dm" based URLs, notably for the registration part..

PedroKantar avatar Dec 31 '20 08:12 PedroKantar

Thanks @PedroKantar. I understand that Google is using it internally. In my project, we are planning to use push-receiver module for the Node.js process to receive the push notification. My concern is that any change/update in C2DM APIs might affect this module and eventually my application feature. We cannot check this with Google support desk as they deprecated the public use and only using it for internal purposes.

senthil5053 avatar Dec 31 '20 16:12 senthil5053

We are using the push-receiver module since it was created, with the same concerns you have and so far it is still working perfectly..

PedroKantar avatar Jan 04 '21 08:01 PedroKantar

Thanks @PedroKantar. Hope it continues to work :)

senthil5053 avatar Jan 04 '21 17:01 senthil5053

I believe it has stopped working. Calls to the C2DM endpoint return 503 now.

wtesler avatar Jul 05 '21 17:07 wtesler

As far as I can tell, both Chromium based browsers and Android itself still use /c2dm/register3 up to this day successfully (I actually just implemented this over at: https://github.com/BRUHItsABunny/go-android-firebase)

Funny fact though, IOS checkin uses another endpoint device-provisioning.googleapis.com/checkin Full request:

:method: POST
:scheme: https
:path: /checkin
:authority: device-provisioning.googleapis.com
accept: */*
content-type: application/json
accept-encoding: gzip, deflate, br
user-agent: YouTube/17.05.2 CFNetwork/1220.1 Darwin/20.3.0
content-length: 253
accept-language: en-us

{"locale":"en_US","digest":"","checkin":{"iosbuild":{"model":"iPhone9,4","os_version":"IOS_14.4.2"},"last_checkin_msec":0,"user_number":0,"type":2},"time_zone":"America\/Chicago","user_serial_number":0,"id":0,"version":2,"security_token":0,"fragment":0}

Where it then gets and android_id and security_token in the response (also JSON)

And then actually registers over at fcmtoken.googleapis.com/register

jan, 2023: I finally got around to make a working proof of concept for receiving android app push notifications, c2dm still works

BRUHItsABunny avatar Feb 12 '22 17:02 BRUHItsABunny