Quickblox: Unable to get push Notifications with FCM getting errr 401

1.2k views Asked by At

I want to implement push notification in app by FCM. The app is successfully getting FCM pushnotification but when i want to send from Quickblox admin pannel then that give me error like

error_description":"Unable to deliver notification 20860148, received error 401 (Unauthorized, check your App auth_key.)

This is log.json file :-

{"notification":{"registration_ids":["dA_lOjHQU2M:APA91bHB0zGuoalZoxtdcstBQ0dL0pPJA5HyUaoPVibD2iqnrUA51NLqrrmY5zrTZV7OaP55nUEber9NLkPs_ENkVtHLvbEAcHTrgh8wl_YoNhRsUNdyeIWt0mPDKk0tCDyLssXRuFu8"],"delay_while_idle":false,"data":{"message":"hii tesas","collapse_key":"event12616627"},"priority":"high","time_to_live":86400},"

log":[{"device_token":null,"created_at":"2016-12-14T09:56:50Z","delivered_at":null,"failed_at":"2016-12-14T09:56:51Z","error_code":401,"error_description":"Unable to deliver notification 20860148, received error 401 (Unauthorized, check your App auth_key.)"}]}

2

There are 2 answers

0
Shashank On BEST ANSWER

You are required to put Google Cloud Messaging (GCM) API key in your Quickblox Admin panel. Make sure you put Google Server Key there.

Follow these steps to get the server key:

  1. Log into Google api console https://console.cloud.google.com/apis/
  2. Go to "Credentials" in the navigation on the left side.
  3. There you should have your Server Key.

Hope this helps!

0
viral 9966 On

Because of GCM deprecate now so You are required to put Firebase Cloud Messaging (FCM) API Server key in your Quickblox Push notification panel go to setting and paste FCM Server key in Android-> Develpment or Production. Make sure you put Firebase Server Key there.

Follow these steps to get the server key:

Log into Firebase console https://console.firebase.google.com/ Add your project or select your project if you are already added now click on setting icon go to project setting -> cloud messaging. there you can find your server key copy that key and paste in

enter image description here

There you should have your Server Key. Hope this helps!