unauthorized error 401 android push notification

1,469 views
Skip to first unread message

Sruthi M

unread,
Sep 9, 2016, 2:16:44 AM9/9/16
to android-gcm
Hi All,

I have used https://android.googleapis.com/gcm/send curl in my project to send notifications to android device. Its worked fine earlier. but now I am getting unauthorized error 401.

Now google introduced Firbase for notifications. My app is already hosted in store not getting notifications. Now Is gcm supports or  not?

Regards,
Sruthi M

Todd Hansen

unread,
Sep 9, 2016, 4:23:34 PM9/9/16
to andro...@googlegroups.com
are you using the server key associated with your product in https://console.firebase.google.com/?

Find your project, settings, project settings, cloud messaging tab?

Sruthi M

unread,
Sep 9, 2016, 11:41:36 PM9/9/16
to andro...@googlegroups.com

Hi Todd Hansen,

I found the solution. Created new project in firebase console. Took server key and sender id from cloud messaging. And replaced these two keys in existing GCM code. Now notifications is sent out.  I didn't disturb existing server side and app side code.

On Sep 10, 2016 1:53 AM, "'Todd Hansen' via android-gcm" <andro...@googlegroups.com> wrote:
are you using the server key associated with your product in https://console.firebase.google.com/?

Find your project, settings, project settings, cloud messaging tab?

--
You received this message because you are subscribed to a topic in the Google Groups "android-gcm" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-gcm/x2HhOKHlzXs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-gcm+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/CAH6JfoU2ELKRAM3%2BF_qeCx9cGg6Ky75hniRTrf8PpZxAu2JVjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Todd Hansen

unread,
Sep 13, 2016, 12:12:27 AM9/13/16
to andro...@googlegroups.com
I'm glad you figured it out. 

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm+unsubscribe@googlegroups.com.

To post to this group, send email to andro...@googlegroups.com.

Sruthi M

unread,
Sep 13, 2016, 2:02:10 AM9/13/16
to andro...@googlegroups.com

JeeJee Studio

unread,
Sep 13, 2016, 3:58:48 PM9/13/16
to android-gcm
Hi, you can also just add the IP of your server to your KEY credentials in gcm. So this IP is allowed to send messages. Then it works again. I had the same.
Its no longer allowed to have an unrestricted Key.

Op dinsdag 13 september 2016 08:02:10 UTC+2 schreef Sruthi M:
Thank you!

On Tue, Sep 13, 2016 at 9:41 AM, 'Todd Hansen' via android-gcm <andro...@googlegroups.com> wrote:
I'm glad you figured it out. 
On Fri, Sep 9, 2016 at 8:41 PM, Sruthi M <bsru...@gmail.com> wrote:

Hi Todd Hansen,

I found the solution. Created new project in firebase console. Took server key and sender id from cloud messaging. And replaced these two keys in existing GCM code. Now notifications is sent out.  I didn't disturb existing server side and app side code.

On Sep 10, 2016 1:53 AM, "'Todd Hansen' via android-gcm" <andro...@googlegroups.com> wrote:
are you using the server key associated with your product in https://console.firebase.google.com/?

Find your project, settings, project settings, cloud messaging tab?

--
You received this message because you are subscribed to a topic in the Google Groups "android-gcm" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-gcm/x2HhOKHlzXs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-gcm...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.

To post to this group, send email to andro...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "android-gcm" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-gcm/x2HhOKHlzXs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-gcm...@googlegroups.com.

To post to this group, send email to andro...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages