<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/firebase-cloud-messaging-comes-to-the-admin-node-js-sdk-eyo2ugi2i" -->

---
title: Firebase Cloud Messaging comes to the Admin Node.js SDK
description: Firebase's Admin SDKs gained two new capabilities: the Node.js SDK can now send push notifications via Firebase Cloud Messaging (FCM) to devices, device...
canonical: https://daily.dev/posts/firebase-cloud-messaging-comes-to-the-admin-node-js-sdk-eyo2ugi2i
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Firebase Cloud Messaging comes to the Admin Node.js SDK | daily.dev
og:description: Firebase's Admin SDKs gained two new capabilities: the Node.js SDK can now send push notifications via Firebase Cloud Messaging (FCM) to devices, device...
og:url: https://daily.dev/posts/firebase-cloud-messaging-comes-to-the-admin-node-js-sdk-eyo2ugi2i
og:image: https://api.daily.dev/og/posts/eYo2UGI2i.png
og:image:alt: Firebase Cloud Messaging comes to the Admin Node.js SDK
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Firebase Cloud Messaging comes to the Admin Node.js SDK

**[Firebase](https://daily.dev/sources/firebase-blog)** · 4 min read · 0 upvotes · 0 comments

## Summary

Firebase's Admin SDKs gained two new capabilities: the Node.js SDK can now send push notifications via Firebase Cloud Messaging (FCM) to devices, device groups, topics, and conditions using the existing app credential, and the Java SDK now supports a full credential interface, including Google Application Default Credentials for auto-discovery on Google infrastructure, replacing the older setServiceAccount() method. Code samples cover sending conditional messages with priority and TTL options, and migrating Java initialization from setServiceAccount() to setCredential().

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://firebase.blog/posts/2017/02/firebase-cloud-messaging-integrated>

## Questions this post answers

### How do I send a push notification via Firebase Cloud Messaging from the Node.js Admin SDK?

Use the admin.messaging methods added to the Firebase Admin Node.js SDK, such as sendToCondition, sendToDevice, or sendToDeviceGroup, no extra setup beyond the existing app credential. For example, admin.messaging.sendToCondition(condition, payload) sends a notification to devices subscribed to matching topics, and you can pass an optional third options argument for priority and timeToLive.

_daily.dev surfaces SDK feature drops like this one for developers building notification flows._

### How do I set message priority and time to live when sending FCM messages from the Admin SDK?

Pass a third options object to any Admin Node.js FCM send method with priority and timeToLive fields, for example priority: 'high' and timeToLive: 60 * 60 * 24 * 7 for a one week expiration. This lets high-urgency notifications, like a game day alert, be dropped after a set window if undelivered.

_Developers tuning notification delivery windows track SDK capabilities like this on daily.dev._

### How do I migrate the Firebase Admin Java SDK from setServiceAccount to setCredential?

Replace the old FirebaseOptions.Builder().setServiceAccount(serviceAccount) call with setCredential(FirebaseCredentials.fromCertificate(serviceAccount)), or use FirebaseCredentials.applicationDefault() to auto-discover credentials on Google App Engine or Compute Engine without managing a service account file. This lets the same code run unchanged across local, staging, and production.

_daily.dev helps backend teams keep up with SDK migration steps like this Java credential change._

## Similar posts on daily.dev

- [Dynamic configuration in Java with Server-Side Firebase Remote Config](https://daily.dev/posts/dynamic-configuration-in-java-with-server-side-firebase-remote-config-yvb4sfjnd) · Firebase Developers · 0 upvotes · 0 comments
- [When Notifications Became Data Trucks: A Real-World Crash Story from Firebase FCM](https://daily.dev/posts/when-notifications-became-data-trucks-a-real-world-crash-story-from-firebase-fcm-nh9ixqylv) · ProAndroidDev · 1 upvotes · 0 comments
- [How to Use Dart Cloud Functions and the Firebase Admin SDK: A Handbook for Developers](https://daily.dev/posts/how-to-use-dart-cloud-functions-and-the-firebase-admin-sdk-a-handbook-for-developers-ailkvowjb) · freeCodeCamp · 2 upvotes · 0 comments

---

Tags: [#java](https://daily.dev/tags/java), [#nodejs](https://daily.dev/tags/nodejs), [#backend](https://daily.dev/tags/backend), [#firebase](https://daily.dev/tags/firebase)

[View this post on daily.dev](https://daily.dev/posts/firebase-cloud-messaging-comes-to-the-admin-node-js-sdk-eyo2ugi2i)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Firebase Cloud Messaging comes to the Admin Node.js SDK","url":"https://daily.dev/posts/firebase-cloud-messaging-comes-to-the-admin-node-js-sdk-eyo2ugi2i","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/firebase-cloud-messaging-comes-to-the-admin-node-js-sdk-eyo2ugi2i"},"datePublished":"2026-08-23T12:21:00.715Z","dateModified":"2026-08-23T13:00:28.982Z","description":"Firebase's Admin SDKs gained two new capabilities: the Node.js SDK can now send push notifications via Firebase Cloud Messaging (FCM) to devices, device...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ed721de96163685d26ab7e314be3ebc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ed721de96163685d26ab7e314be3ebc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Firebase","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Firebase","logo":"https://media.daily.dev/image/upload/s--i395oqZH--/f_auto,q_auto/v1787487448/logos/firebase-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/firebase-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/firebase-cloud-messaging-comes-to-the-admin-node-js-sdk-eyo2ugi2i","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"java,nodejs,backend,firebase","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Firebase","item":"https://daily.dev/sources/firebase-blog"},{"@type":"ListItem","position":3,"name":"Firebase Cloud Messaging comes to the Admin Node.js SDK"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/firebase-cloud-messaging-comes-to-the-admin-node-js-sdk-eyo2ugi2i#faq","mainEntity":[{"@type":"Question","name":"How do I send a push notification via Firebase Cloud Messaging from the Node.js Admin SDK?","acceptedAnswer":{"@type":"Answer","text":"Use the admin.messaging methods added to the Firebase Admin Node.js SDK, such as sendToCondition, sendToDevice, or sendToDeviceGroup, no extra setup beyond the existing app credential. For example, admin.messaging.sendToCondition(condition, payload) sends a notification to devices subscribed to matching topics, and you can pass an optional third options argument for priority and timeToLive. daily.dev surfaces SDK feature drops like this one for developers building notification flows."}},{"@type":"Question","name":"How do I set message priority and time to live when sending FCM messages from the Admin SDK?","acceptedAnswer":{"@type":"Answer","text":"Pass a third options object to any Admin Node.js FCM send method with priority and timeToLive fields, for example priority: 'high' and timeToLive: 60 * 60 * 24 * 7 for a one week expiration. This lets high-urgency notifications, like a game day alert, be dropped after a set window if undelivered. Developers tuning notification delivery windows track SDK capabilities like this on daily.dev."}},{"@type":"Question","name":"How do I migrate the Firebase Admin Java SDK from setServiceAccount to setCredential?","acceptedAnswer":{"@type":"Answer","text":"Replace the old FirebaseOptions.Builder().setServiceAccount(serviceAccount) call with setCredential(FirebaseCredentials.fromCertificate(serviceAccount)), or use FirebaseCredentials.applicationDefault() to auto-discover credentials on Google App Engine or Compute Engine without managing a service account file. This lets the same code run unchanged across local, staging, and production. daily.dev helps backend teams keep up with SDK migration steps like this Java credential change."}}]}
```

