Blog

FCM changes for 2027: what to migrate and when

Thomas SchiavoneThomas Schiavone
FCM device groups deprecated 2027 cover

Google has deprecated FCM device groups and the InstanceId server APIs. Both stop working on September 29, 2027, and new Firebase users can't start using them after January 1, 2027. Separately, Google has deprecated sending to registration tokens in favor of Firebase installation IDs (FIDs), with no removal date yet.

If you send with the HTTP v1 API to individual registration tokens, the 2027 deadline doesn't touch you. The one thing to check is server-side topic management: older firebase-admin versions route it through InstanceId.

If you do use device groups or call iid.googleapis.com, nothing degrades before the cutoff. After it, calls to the deprecated APIs return errors.

What's going away and when

The first five rows come from Google's deprecation FAQ. The last is the separate move to installation IDs.

WhatEndpointReplacementStops working
Device group managementfcm.googleapis.com/fcm/notification (also /gcm/notification, /iid/notification, /notification)Your own user-to-token mappingSeptember 29, 2027
Device group sendsA notification_key passed in the token field of v1 messages:sendSend to each tokenSeptember 29, 2027 (the send endpoint stays, group keys stop working)
Token infoiid.googleapis.com/iid/infoA v1 send with validate_only: true, or the v1 topic subscription API for subscription infoSeptember 29, 2027
Topic managementiid.googleapis.com/iid/v1/…/rel/topics, iid/v1:batchAdd, iid/v1:batchRemoveFCM v1 topic subscription APISeptember 29, 2027
Batch importiid.googleapis.com/iid/v1:batchImportThe FCM iOS SDK on the client, or send to APNs directlySeptember 29, 2027
Registration token sendsThe token field in v1 messages:sendThe fid fieldDeprecated, no removal date

The batch import row matters if you convert APNs tokens to FCM tokens on your server. That conversion goes away entirely. Either let the FCM iOS SDK register the device, or send to those iOS devices through APNs with the tokens you already have.

Check whether you're affected

Search your code and scripts for the deprecated endpoints, the group key, and the legacy topic methods:

Terminal
grep -rnE 'notification_key|iid\.googleapis\.com|googleapis\.com/(fcm/|gcm/|iid/)?notification|(subscribeTo|unsubscribeFrom)TopicLegacy' \
  --exclude-dir=node_modules --exclude-dir=.git .

No matches is a good sign, not proof. A v1 send to a device group passes the group key in the ordinary token field, so code that reads keys from a column named something like group_key won't match. Check wherever you create or store group keys too.

Then check your Admin SDK version if you subscribe devices to topics from the server:

Terminal
npm ls firebase-admin

firebase-admin for Node.js 14.4.0 and earlier sends subscribeToTopic() and unsubscribeFromTopic() through the InstanceId API. Upgrade to 14.5.0 or later. The other Admin SDKs have the same cutoff at Python 7.7.0, Java 9.11.0, Go 4.22.0, and .NET 3.7.0.

Replace device groups with your own token list

Device groups let FCM hold the list of a user's devices for you. After September 29, 2027, it won't. Google's migration guide is direct about the fix: build your own mapping between a group (usually a user ID) and its registration tokens, store it on your server, and update it whenever the app reports a new or refreshed token.

Export what you have first. The device group API's GET method returns the tokens for a notification_key, and Google won't keep that data after the cutoff. Loop over your stored keys and write each token list to your database now.

Sending to a group then becomes sending to each token. With the Admin SDK that's one sendEachForMulticast() call. With raw HTTP v1, it's one request per token. Topics aren't a drop-in swap: Google tunes them for large fanout and throughput, not for reaching one person's three devices quickly.

If you send push through Courier, Courier keeps that mapping for you. It stores each device token against the user ID, one entry per device, and one send to the user reaches every device. A token that hasn't been re-registered in 60 days expires on its own. You stop maintaining a group on Google's side and you never build a fanout loop.

To bring over the tokens you exported, register each one with the Courier Node SDK. Each call adds or refreshes one device without touching the user's other tokens:

JavaScript
import Courier from "@trycourier/courier";

// Reads COURIER_API_KEY from the environment
const courier = new Courier();

// Register each FCM token your device group used to hold, one call per device
for (const token of ["FCM_TOKEN_PHONE", "FCM_TOKEN_TABLET"]) {
  await courier.users.tokens.addSingle(token, {
    user_id: "user_123",
    provider_key: "firebase-fcm",
  });
}

// One send to the user reaches every registered device
const { requestId } = await courier.send.message({
  message: {
    to: { user_id: "user_123" },
    template: "YOUR_TEMPLATE_ID",
  },
});

After the import, your server doesn't write tokens at all. On Android, the Courier SDK registers and refreshes the FCM token once you forward onNewToken to it, and signing out removes that device's token. The FCM integration docs cover token setup and the service account.

Move topic management and token validation

Topic management has two routes. Upgrade firebase-admin (14.5.0 or later on Node.js) and your existing subscribeToTopic() and unsubscribeFromTopic() calls move to the new API without changing those calls. Or call the v1 topic subscription API directly: POST to fcm.googleapis.com/v1/projects/PROJECT_ID/registrations/REGISTRATION_ID/topicSubscriptions with a topic_name query parameter to subscribe, DELETE to unsubscribe, and GET to list a device's subscriptions. That GET also replaces iid/info if you used it to read subscription info.

For token validation, Google's answer is a dry-run send: set validate_only: true on a v1 messages:send request and FCM checks the message without delivering it. In the Admin SDK, that's the second argument to send():

JavaScript
import { initializeApp } from "firebase-admin/app";
import { getMessaging } from "firebase-admin/messaging";

// Uses the service account in GOOGLE_APPLICATION_CREDENTIALS
initializeApp();

// The payload below is fixed, so invalid-argument here means a malformed token
const DEAD_TOKEN_CODES = new Set([
  "messaging/registration-token-not-registered",
  "messaging/invalid-argument",
]);

async function isTokenRegistered(token) {
  try {
    // dryRun = true sends validate_only: FCM validates, nothing reaches the device
    await getMessaging().send({ token, data: { check: "1" } }, true);
    return true;
  } catch (err) {
    if (DEAD_TOKEN_CODES.has(err.code)) return false;
    throw err;
  }
}

Delete a token from your store when this returns false. A messaging/mismatched-credential error still throws, because it means either the token belongs to another Firebase project or your service account is wrong. Check your credentials before you delete anything on that error.

Registration tokens to installation IDs

This one has no deadline. Google's token management guide says FCM is moving from registration tokens to Firebase installation IDs, and that both are fully supported during the transition. In the v1 API reference, the token field is marked deprecated in favor of a new fid field, and token also accepts an FID while the transition lasts. The Node.js Admin SDK added FidMessage and FidMulticastMessage types in 14.1.0.

Nothing forces a move today. Two things set you up for it:

  • Keep token storage in one place. One table or profile per user, with a last-updated timestamp on each entry. When you swap identifier types, it's a change in one spot, not a hunt through every service that sends.
  • Watch for a removal date. Check the FCM docs and the Admin SDK release notes when you upgrade. Plan the switch once a date appears.

If you send with firebase-admin yourself

If you manage topics from the server on Node.js, the fix is 14.5.0, so you'll cross the v14 breaking changes on the way. From the release notes, these hit push code:

  • 14.0.0 dropped Node.js 18 and 20. You need Node.js 22 or later.
  • 14.0.0 removed the legacy namespace imports. Import from the module entry points, such as firebase-admin/app and firebase-admin/messaging.
  • 14.0.0 removed the legacy messaging payload types: DataMessagePayload, MessagingOptions, MessagingPayload, and NotificationMessagePayload.
  • 14.5.0 moved topic subscribe and unsubscribe to the v1 API. It also added subscribeToTopicLegacy() and unsubscribeFromTopicLegacy(), which still call InstanceId. They're deprecated, so don't switch to them to dodge the change.

Wrapping up

  • If you send to individual tokens with HTTP v1, you probably don't need to do anything for 2027. Those sends keep working.
  • Device groups and the InstanceId APIs stop on September 29, 2027. New users lose access on January 1, 2027.
  • Export your device group data before the cutoff. Google won't keep it.
  • Upgrade firebase-admin if you manage topics from the server (14.5.0 or later on Node.js).
  • Registration tokens are deprecated with no removal date. Keep token storage in one place so the switch to FIDs is small.

If you're rebuilding token storage anyway, store tokens per user and let one send reach every device. That's how Courier handles FCM and APNs: tokens are stored against the user ID, the mobile SDKs keep them current, and you send to that user ID. The push overview covers the token model and SDK setup.

Frequently asked questions

When do FCM device groups stop working?

September 29, 2027. After that, the device group management API returns errors and v1 sends no longer accept a notification_key as the target. New Firebase users can't start using device groups after January 1, 2027.

Does the FCM deprecation affect the HTTP v1 send API?

No. The v1 messages:send endpoint keeps working for individual registration tokens, topics, and conditions. Only device group keys stop being valid targets.

Do I have to switch to Firebase installation IDs now?

No. Google has deprecated the token field but hasn't set a removal date, and both identifiers are supported during the transition.