how to give the fcm server key for javascript push notification in android setup?

0 votes
i have to put the fcm server key in android setup for our ionic android platform. using app42 javascript sdk. i have get the 401 error in push logs. but device is registered in the push notification users.
asked Feb 10, 2017 in JavaScript by Extranetaccess (11 points)
edited Feb 10, 2017 by Extranetaccess

1 Answer

0 votes
Hi Extranetaccess,


FCM server key need to be uploaded in the dashboard under Unified notification -> Settings -> Android setting. Could you please let us know how you integrated Push notification in your ionic application means the step which you have followed. It will help us to provide better support to you.



Himanshu Sharma
answered Feb 11, 2017 by hs00105 (2,005 points)
Yes, we have uploaded the server key as you mentioned, but not working. Below are steps we have followed. Let us know if you need any further information

1. Created our application in google developer console
2. In google developer console, under "Library", Mobile APIs, click on "Google cloud messaging"
3. It is redirecting to FCM (Firebase Cloud Messaging)
4. We clicked on "Get Started for Free" on home page FCM
5. Imported existing project from google developer console
6. We clicked on app, in the app dashboard, opened application settings.
7. Downloaded google-services.json, copied to android project folder
8. Clicked on "Cloud Messaging" tab on FCM application dashboard. Copied server key and went to shephertz dashboard.
9. Under Unified Notifications > Settings > Android > View > Add Key > pasted the server key copied in above step.
Note: Serer key is about 153 characters length, but it is accepting only 51 characters.
10. Also followed steps documented at
11. Getting below error in logs
Push Android Worker Exception : HTTP Status Code: 401

All the steps which you have mentioned are correct only the server key which you have added that you have to change. Instead of copying server key of 153 character , copy Legacy Server key which is available below on same panel.

It will resolve your issue.

Himanshu sharma
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on