Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

Help for owners

My app's Firebase notifications are failing and my developer says it is the old API

Short answer

Firebase's current sending API authorises each request with a short-lived token from a service account, not with a static server key. If your server still uses the old method or old Admin SDK calls, sends can fail. Ask your developer which method the server uses and whether device tokens are being cleaned up.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Does this sound like your situation?

  • Notifications that worked before now fail from the server.
  • My developer says the server is on the legacy Firebase API.
  • Firebase sent a notice about changes to the messaging API.
  • Some phones get messages and others never do.
  • Nobody has the credentials the server uses to send.

Why does this happen?

  1. The server sends with a static key

    The current Firebase sending API authorises requests with short-lived OAuth 2.0 access tokens requested with a service account. A server built around an old static key has to be changed.

  2. Old Admin SDK calls are still used

    Firebase's Admin SDK handles authorisation automatically in the current API, so code that built its own requests, or used older calls, needs updating. The technical detail is on the fix page linked below.

  3. The service account is missing or expired

    The server needs credentials for a service account with permission to send. If the person who created them has left, nobody may know where they are kept.

  4. Stale device tokens pile up

    Firebase says a registration is stale if the app has not connected for over a month. On Android, a registration is considered expired after 270 days of inactivity and sends to it are rejected. Firebase advises removing stale tokens.

  5. Errors are not acted on

    Firebase says the error codes for an unregistered or invalid token mean the token will never be valid again and should be deleted. A server that ignores them keeps sending to dead addresses.

What can I do about it today?

  1. Ask which method the server usesOne sentence to your developer: does the server send through the current Firebase API or the old one?
  2. Find the Firebase project ownerCheck that your company, not a former developer, owns the Firebase project and can see the messaging settings.
  3. Keep the old setup until the new one is testedDo not delete keys or accounts that the live server might still use.
  4. Send one test messageAsk for a test notification to one named phone before any change goes to customers.
  5. Ask about old tokensRequest a short note on how the server removes device tokens that no longer work.

When should I bring someone in?

  • Sends are failing and nobody can change the server code.
  • Your developer left and nobody has the Firebase credentials.
  • Notifications go out through several systems and you do not know which uses the old method.

How do I handle it?

  1. Find every senderI locate each server, function and tool that sends notifications and note which API each uses.
  2. Move to the current APIThe sending code is updated to use a service account and short-lived tokens, with credentials stored safely and owned by your company.
  3. Test one message end to endA test goes to a real Android and a real iPhone before any real send.
  4. Clean up tokensTokens that Firebase reports as invalid are removed, and a regular clean-up is set up.
  5. Hand over the detailsA short note lists where the credentials are and who owns them.

The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.

What do owners ask about this?

Do customers need to update the app?

Changing how the server sends does not require a new app release in itself. Your developer can confirm for your setup.

Is there a shutdown date?

I could not read an official page that states one, so I give none. Check Firebase's own notices for your project.

Do I lose my users' tokens?

Moving to the new API does not by itself delete device tokens. Stale ones should be removed as Firebase advises.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.

For your developer: the technical fixes

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.