43

Is it possible to use same sender id for more applications? Now I have 18 application (different language and some functionality) which use same backend. Now I am implementing push notifications with GCM. But backend team preffer to have only one google project - SENDER ID for all applications. Did anyone try it? Is this scenario possible? What are the drawbacks?

Thanks

pcu
  • 2,686
  • 4
  • 15
  • 22

1 Answers1

104

Developers are perfectly welcome (and encouraged) to use the same sender ID / API key for all of their apps.

When you send a message, you specify a registration ID, which is implicitly linked to the package name of the app + device where it was generated. Only the app which requested the registration ID will receive your message.

Source: I'm a member of the Android team at Google.

Abhishek Nandi
  • 4,185
  • 1
  • 28
  • 42
Trevor Johns
  • 15,276
  • 3
  • 52
  • 53
  • 2
    Just curios to know that what happens in case someone reverse engineer's the `.apk` and extracts the `SENDER ID`? As multiple apps are allowed to use the same sender ID, then can the attacker use the same sender ID for his fake app( with same package name on a different store) as well? – Shobhit Puri Aug 12 '13 at 20:24
  • 1
    I have the same question as Shobhit (in fact I was about to post it because of his recent question here: http://stackoverflow.com/questions/18196292/what-are-consequences-of-having-gcm-sender-id-being-exposed when I noticed his comment). A lot of people seem to believe that it's important to keep the sender ID safe, but why? – Jason C Aug 12 '13 at 21:00
  • 1
    @JasonC There is an answer on the above question. See http://stackoverflow.com/a/18216063/1306419 . Hope it will clear few things. – Shobhit Puri Aug 13 '13 at 19:09
  • @Trevor Johns please check my question related to mismatch sender id http://stackoverflow.com/questions/20498488/gcm-different-sender-id-with-mismatchsender-id-error – Mahi Dec 11 '13 at 05:49
  • 4
    @Trevor Johns Is it the same case for IOS? – gherkin Jan 12 '16 at 17:20
  • Can same sender ID / API key for all apps work in FCM also? – PankajAndroid Aug 25 '17 at 13:23
  • 1
    Google is so much friendlier compared to Apple when it comes to notifications... and many other things as well. Love it! Thanks for your answer! – Andrei Oct 19 '17 at 15:40