0

I would like to send push notifications to app users and to do that I have written server side script in PHP.

In many blogs like this one, I have read that to send notifications from server to Android devices, we need to get Server Key, but in one of the recent tutorial I read about Browser Key

So which key I need to get, to get my work done, either Server Key or Browser Key, and may I know the exact difference between these two keys.

Sun
  • 6,768
  • 25
  • 76
  • 131
  • - Server keys : Create and use a server key if your application runs on a server. Do not use this key outside of your server code. For example, do not embed it in a web page. To prevent quota theft, restrict your key so that requests are only allowed from your servers' source IP addresses. - Browser keys : Create and use a browser key if your application runs on a client, such as a web browser. To prevent your key from being used on unauthorized sites, only allow referrals from domains you administer. – Phuoc Huynh Jan 29 '16 at 07:01
  • @PhuocHuynh so which key I need to use to send push notifications from server side to android devices ? OR .. I can use any key.. – Sun Jan 29 '16 at 07:05
  • Android -> GCM ->(get registration ids)-> input this id to server -> sever get this id -> push notification to device Thanks @Sanjeev kumar – Phuoc Huynh Jan 29 '16 at 07:14

1 Answers1

1

You need to use server key for push notification.

refer here for difference between server key and browser key

Community
  • 1
  • 1
Sanjeev kumar
  • 60
  • 1
  • 3