Zelter Ady Zelter Ady - 2 years ago 121
Android Question

Android GCM SENDER_ID, how to get it?

I try to migrate to

and I have an issue with the
I need to provide. I use the demo project from goole. In this project I need, if I understand this well, to provide a
to the application in the CommonUtilities.java file.

The SENDER_ID I provided is the API key I registered on https://code.google.com/apis/console/ and has this form:
(total 40 chars).

Using this string as
I get on "BroadcastReceiver mHandleMessageReceiver" an error message: From GCM: error (INVALID_SENDER)..

Where is the mistake? The string I provide is not the

Thank you.

Answer Source

No, the SENDER_ID is the project ID you signed up at Google API console, it should a numeric string. e.g. on your browser URI, you should see this:


The Sender ID is 4815162342

Updated Answer:

Google has not updated its docs completely. The above answer is old and its based on this documentation and it seems that its still not updated.

According to updated Google docs, it seems that Project Number on Google API Console is used as SENDER ID

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download