2

I am confused a little for which API key should I use for the GCM server. In the documentation it says use android api key, which did not work with me and always gives unauthorized. http://developer.android.com/google/gcm/gs.html I used server key which worked for me, but I am wondering why the documentation says that? Am I doing something wrong?

I saw this post also, but I could not get an answer. GCM Push Server side, which API Key to use?

Thanks for advance.

Community
  • 1
  • 1
Abdalla
  • 2,071
  • 2
  • 16
  • 27
  • i dont understand your question, but this [link](https://github.com/rutulpatel/Android-Google-Cloud-Messaging-GCM-using-PHP-Tutorial) would help you for sure. – rutulPatel Feb 07 '14 at 01:43
  • 1
    @rutulpatel thank you very much. According to the tutorial, Server API key is the right way to do it, not Android API Key. I am still confused about why the documentation says to create Android API key. – Abdalla Feb 07 '14 at 11:50

1 Answers1

0

Server Key is the one that should be used, because the server is the side that send the push notification.

Abdalla
  • 2,071
  • 2
  • 16
  • 27