ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 206 forks source link

New GCM endpoint hostname #162

Closed eladnava closed 8 years ago

eladnava commented 8 years ago

Google decided to change its GCM HTTP endpoint to https://gcm-http.googleapis.com/gcm/send, instead of https://android.googleapis.com/gcm/send, likely because GCM is no longer Android-only.

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

The parameters remain the same, just the hostname has changed.

Would you like me to update it in the constants.js file via a PR?

hypesystem commented 8 years ago

That would be great :-)

psirenny commented 8 years ago

@eladnava could the change to the endpoint be responsible for the recent mismatch sender id errors I've been receiving? If not I'll continue to explore what may be wrong with my api key.

eladnava commented 8 years ago

@psirenny I don't think it's related. I believe that MismatchSenderId means that you are trying to send push notifications using a GCM Server API Key that is linked to a different SENDER_ID than was used to generate some of your registration IDs on the client-side.

People report that they get this error when trying to send push notifications to old C2DM registration IDs.

hypesystem commented 8 years ago

@psirenny the old endpoint still works but is deprecated, so this is not the cause of any errors :-)

psirenny commented 8 years ago

Thanks guys, you were right. My development and production project numbers got crossed.