skip to Main Content

Firebase – FCM send – 401 Unauthorized even though can query Firestore documents

Im trying to send FCM in my kotlin springboot backend. I can query/write firestore documents successfully. But when I try to send fcm, I got below error. message: "handleException /<endpoint> com.google.api.client.http.HttpResponseException: 401 Unauthorized POST https://fcm.googleapis.com/v1/projects/<project-id>/messages:send" The Service Account have Firebase…

VIEW QUESTION

Ubuntu – Cant access Firebase Admin SDK via Node.js on my VPS, but I can on my local machine

When running this code on my VPS: import admin from 'firebase-admin' import serviceAcc from '../config/test.json' export async function fbAdminSdkTest() { try { console.log('using credentials') console.log(admin.credential.cert(serviceAcc as any)) console.log('!') admin.initializeApp({ credential: admin.credential.cert(serviceAcc as any), }) const test = await admin.auth().createUser({ email:…

VIEW QUESTION
Back To Top
Search