Skip to content

Firebase Cloud Messaging errorFCM “The registration token is not a valid FCM registration token” (INVALID_ARGUMENT)

Your server sends a push and Firebase Cloud Messaging answers HTTP 400 INVALID_ARGUMENT with the message The registration token is not a valid FCM registration token, or the Admin SDK throws messaging/invalid-registration-token. The string you sent as the token is not one FCM issued. Here is what Firebase says to check, or hand it over at a fixed price.

Rather hand it over? App Fix Ticket: One reproducible bug in an existing mobile or web app, diagnosed and fixed.

Full refund if Simon can’t take it on once he sees your project, or if you cancel before work starts. Refund terms.

Short answer

The token your server sent is malformed: cut short, padded with extra characters, or not an FCM token at all (for example a raw APNs device token, a user ID, or an empty value). Log the exact token the app gets from the FCM SDK, save it unchanged, and send that. If the payload is valid and a saved token still fails this way, delete it.

Rather not fix it yourself? App Fix Ticket starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.

Why FCM rejects the token, and the fix

  1. 01

    The token was cut short or changed

    “Make sure it matches the registration token the client app receives from registering with FCM. Don't truncate or add additional characters to it.” Firebase, FCM error codes (messaging/invalid-registration-token)

    A database column that is too short, a trim or split in your code, quotes or a newline saved with the value, or a token copied by hand from a log can all break it. Store the token as plain text with no length limit and compare what you send with what the device printed.

  2. 02

    The value is not an FCM token

    “Check the format of the registration token you pass to the server.” Firebase, FCM ErrorCode (INVALID_ARGUMENT)

    On iOS the app has two tokens: the APNs device token from Apple and the FCM registration token from Firebase. Sending the APNs token to FCM fails, and so does a user ID, a Firebase Installation ID or an empty string from a missing field. Save the token returned by the FCM SDK (getToken) and nothing else in that field.

  3. 03

    The token is fine but the message is not

    “it signals an invalid registration only if the payload is completely valid.” Firebase, Manage registration tokens

    INVALID_ARGUMENT is also returned for a bad payload: a message that is too big, a reserved data key, a TTL out of range, or a data value that is not a string. Read the error details first. A payload error carries a BadRequest detail naming the field, such as message.data[0].value; a bad token comes back with the plain message The registration token is not a valid FCM registration token.

Checked against the vendor’s docs on : Firebase docs: FCM HTTP v1 ErrorCode; Firebase docs: FCM error codes (Admin SDK); Firebase docs: Best practices for FCM registration token management.

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
A buyer in the United States, July 2022. Shopify on Fiverr
All 127 Fiverr reviews

Related: FCM registration token not registered · FCM payload size limit exceeded · FCM SENDER_ID_MISMATCH · Flutter APNS token has not been set

Questions

More on this error

Should I delete tokens that fail with INVALID_ARGUMENT?

Only when you are sure the payload is valid. Firebase says that in that case it is safe to delete your record of the registration, since it will never again be valid. Check the payload first, then delete.

Is this the same as UNREGISTERED?

No. UNREGISTERED (404) means a real token that has stopped working, for example after the app was uninstalled. An INVALID_ARGUMENT that points at the token means the string FCM received is not a valid token, so look at how it was saved or sent.

Why do data values cause INVALID_ARGUMENT?

In the HTTP v1 API, message.data takes string values only. Sending a number gives an error like Invalid value at message.data[0].value (TYPE_STRING). Convert numbers and booleans to strings, or put them in a JSON string.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.