Description:
Since I want to send a firebase push notiffication with FCM token, the http request requires both the FCM token and an auth token from google, how do I implement this?
Information on your n8n setup
n8n version: 1.118.2
Database (default: SQLite): postgresDB
n8n EXECUTIONS_PROCESS setting (default: own, main):
Running n8n via (Docker, npm, n8n cloud, desktop app): Docker inside GCP VM
Operating system: Linux VM
A_A4
Février 18, 2026, 11:10
2
Punosie:
firebase
@Punosie
use the OAuth2 API credential.
here is the setup i use for fcm v1:
Go to Firebase Console → Project Settings → Service Accounts → Generate New Private Key
In n8n, create a new OAuth2 API credential.
Grant Type: Service Account (this is important).
Token URL: https://oauth2.googleapis.com/token
Scope: https://www.googleapis.com/auth/firebase.messaging (this is what allows push notifications).
Email & Private Key: Copy them straight from Private key file.
in The HTTP Request Node:
Method: POST
URL: https://fcm.googleapis.com/v1/projects/YOUR_PROJECT_ID/messages:send
Authentication: Select the credential you just made.
Is this the correct OAuth2 credential ?
I don’t see anyplace to add Token URL.
A_A4
Février 18, 2026, 2:39
5
no it isn’t , go to your credential page and search for “OAuth2 API” (literally just those words).
I dont see service account option in this
A_A4
Février 19, 2026, 8:17
7
my bad. i totally sent you down the wrong path.
n8n changed how these are grouped. the generic “OAuth2 API” doesn’t have the service account dropdown anymore.
you need to search the credentials list for Google Service Account instead.
it’s actually way easier now:
paste your Email and Private Key directly into it.
flip the toggle for Set up for use in HTTP Request node .
dump your https://www.googleapis.com/auth/firebase.messaging scope into the new box that pops up.
select that new credential in your http node and it’ll handle the token rotation properly.
what all permissions do I need to give to the service account then ?
A_A4
Février 20, 2026, 11:03
9
@Punosie
in the google cloud console (IAM & Admin section), you need to assign your service account the Firebase Cloud Messaging API Admin role,make sure you select exactly that one.
this video walks through the exact steps of navigating the google console for FCM v1 if you want a visual on where to assign those specific permissions.
… Firebase Cloud Messaging API (v1) Tutorial …
Service Account Credential
Error
Access goven to the service account
API Call Setup
I am still unable to use this with the service account method. Its working with OAuth but I want to use the service account only.
Its working now !!!
The option to add scopes was available only after enabling this HTTP Request option.
Thanks Bro!
A_A4
Février 20, 2026, 8:55
13
it is already in here , happy that i could help you!