Ionic push from ionic.io or ionic api to GCM fails with GCM_INVALID_AUTH


#1

I have added created the app, registered the mobile app for push notification. It was working fine yesterday night. All of a sudden it stopped working stating that GCM_INVALID_AUTH in the notification status. I check the status using curl.
The message that i get when pusing the notification from API is as below

“{“data”: {“uuid”: “602040ba-a1fe-4807-a685-158f8d57cc74”, “state”: “enqueued”, “config”: {“tokens”: [“cwulAItmLqI:APA91bFWEZL_RgvAf5OJhmDEaK-Rze_PZ3pSe6oLoKxSUYBugbJejsSLKDypos96R4aNffpvwMnT4xi6vvimyg3nOw6mp7q69PJcF3_xedYSjk5bJO9rlS6l72DJGQkhUeZGwExV5ceD”], “profile”: “jhpappsec”, “notification”: {“title”: “New Job Posted”, “message”: “New Job posted for the subscribed catergories.”}}, “status”: “open”, “created”: “2016-06-09T18:21:53.869274+00:00”, “app_id”: “bfae6c3c”}, “meta”: {“request_id”: “ef43388a-cb09-4312-b4b9-121a81a5c3c6”, “status”: 201, “version”: “2.0.0-beta.0”}}”

I tried the following.

  1. Changed application
  2. Recreated a new app
  3. changed security profile
  4. verified the GCM API key to be correct in the profile
  5. Tried both development type and production type in the profile
    and so on… it keeps going but the result is same.

I am completely stuck… Please help in getting this out of my way. Thank you in advance


#2

The issue got resolved… Instead of using server key i was using using android key. When i generated server key and linked it in the security profile everything went smooth. I was able to get notification in my mobile application.