Push notifications are not working in our ServiceNow instance integrated with Google FCM.

RajeshS45028713
Tera Contributor

Hi Community,

We have already integrated our ServiceNow instance with Google FCM (Firebase Cloud Messaging) to send push notifications. Initially, the integration was based on an API Key, but as per Google's recent policy changes, we moved to OAuth 2.0 for enhanced security.

Here’s what we’ve done so far:

  • We registered the FCM app in Application Registry.
  • Used Authorization Code as the grant type.
  • Set up the OAuth flow and token retrieval.
  • Push notifications are working successfully for my user account.

Issue:
When other Service Desk agents perform the same action (e.g., creating a Case Task that triggers push notifications), it fails with a 401 Unauthorized error.

Error observed in logs:

 

json

CopyEdit

{ "error": { "code": 401, "message": "Request had invalid authentication credentials.", "status": "UNAUTHENTICATED" } }


Request:
Could someone help me understand:

  • Why it works for only one user?
  • Do I need to generate tokens per user or use a common service account?
  • Is there a better grant type for service-to-service communication in this scenario?

Any guidance or best practices would be greatly appreciated!

Thanks in advance,
Rajesh

5 REPLIES 5

Hello ,

 

You have to put in Google fcm.

 

Regards,

Alok Gupta