Unity Push Notification Problem

0 votes
Hi , i am having an issue using unity push notification service my code : pushsample.cs https://pastebin.com/4e2MUME2 my android manifest : https://pastebin.com/M6YBYdeY and my log issues :

 

Push Android Worker Exception : com.google.android.gcm.server.InvalidRequestException: HTTP Status Code: 401 Exception while sending

Push : cannot retry due to server authentication, in streaming mode

 

and the user is registering in the shephertz server but the notification wont come to device
asked Feb 9, 2018 in Unity by wanderleydaconceicao (11 points)
edited Feb 9, 2018 by wanderleydaconceicao

1 Answer

0 votes

Hi Wander,

Greetings from ShepHertz!!!

Please make sure that Server Key that you are setting in AppHQ is correct. You will get the server key while configuring project on Google or FCM console. In FCM you need to provide legacy server key.

Please find the possible reasons for same.

  • Authentication Error The sender account that you're trying to use to send a message couldn't be authenticated. Possible causes are:
  • Authorization header missing or with invalid syntax.
  • Invalid project number sent as key.
  • Key valid but with GCM service disabled.
  • Request originated from a server not white listed in the Server Key IPs.

 

Let me know if it helps.

Regards

Vishnu Garg

App42 Team

 

answered Feb 13, 2018 by Vishnu Garg (674 points)
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 support@shephertz.com
...