HTTP error responses for the HTTP v1 API contain an error code, an error
message, and error status. They may also contain a details array with more
details on the error.
Here are two sample error responses:
{
"error": {
"code": 400,
"message": "Invalid value at 'message.data[0].value' (TYPE_STRING), 12",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "message.data[0].value",
"description": "Invalid value at 'message.data[0].value' (TYPE_STRING), 12"
}
]
}
]
}
}
{
"error": {
"code": 400,
"message": "The registration token is not a valid FCM registration token",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
"errorCode": "INVALID_ARGUMENT"
}
]
}
}
Note that both messages have the same code and status, but the details array
contains values in different types. The first example has type
type.googleapis.com/google.rpc.BadRequest indicating an error in request
values. The second example with type
type.googleapis.com/google.firebase.fcm.v1.FcmError has an FCM specific error.
For many errors, the details array contains the information you'll need to debug
and find a resolution.
UNSPECIFIED_ERROR No more information is available about this error.INVALID_ARGUMENT (HTTP error code = 400) Request parameters were invalid. An extension of type google.rpc.BadRequest is returned to specify which field was invalid.UNREGISTERED (HTTP error code = 404) App instance was unregistered from FCM. This usually means that the token used is no longer valid and a new one must be used.token value, check that the request contains a registration token.SENDER_ID_MISMATCH (HTTP error code = 403) The authenticated sender ID is different from the sender ID for the registration token.QUOTA_EXCEEDED (HTTP error code = 429) Sending limit exceeded for the message target. An extension of type google.rpc.QuotaFailure is returned to specify which quota was exceeded.UNAVAILABLE (HTTP error code = 503) The server is overloaded.INTERNAL (HTTP error code = 500) An unknown internal error occurred.THIRD_PARTY_AUTH_ERROR (HTTP error code = 401) APNs certificate or web push auth key was invalid or missing.The following table lists the Firebase Admin FCM API error codes and their descriptions, including recommended resolution steps.
| Error Code | Description and Resolution Steps |
|---|---|
messaging/invalid-argument |
An invalid argument was provided to an FCM method. The error message should contain additional information. |
messaging/invalid-recipient |
The intended message recipient is invalid. The error message should contain additional information. |
messaging/invalid-payload |
An invalid message payload object was provided. The error message should contain additional information. |
messaging/invalid-data-payload-key |
The data message payload contains an invalid key. See the reference
documentation for
DataMessagePayload for restricted keys.
|
messaging/payload-size-limit-exceeded |
The provided message payload exceeds the FCM size limits. The limit is 4096 bytes for most messages. For messages sent to topics, the limit is 2048 bytes. The total payload size includes both keys and values. |
messaging/invalid-options |
An invalid message options object was provided. The error message should contain additional information. |
messaging/invalid-registration-token |
Invalid registration token provided. Make sure it matches the registration token the client app receives from registering with FCM. Don't truncate or add additional characters to it. |
messaging/registration-token-not-registered |
The provided registration token is not registered. A previously valid
registration token can be unregistered for a variety of reasons,
including:
|
messaging/invalid-package-name |
The message was addressed to a registration token whose package name does
not match the provided
restrictedPackageName option.
|
messaging/message-rate-exceeded |
The rate of messages to a particular target is too high. Reduce the number of messages sent to this device or topic and don't immediately retry sending to this target. |
messaging/device-message-rate-exceeded |
The rate of messages to a particular device is too high. Reduce the number of messages sent to this device and don't immediately retry sending to this device. |
messaging/topics-message-rate-exceeded |
The rate of messages to subscribers to a particular topic is too high. Reduce the number of messages sent for that topic, and don't immediately retry sending to that topic. |
messaging/topics-subscription-rate-exceeded |
The rate of subscription management requests to a particular topic is too high. Reduce the number of requests sent for that topic, and don't immediately retry the request. |
messaging/too-many-topics |
A registration token has been subscribed to the maximum number of topics and cannot be subscribed to any more. |
messaging/invalid-apns-credentials |
A message targeted to an Apple device couldn't be sent because the required APNs SSL certificate was not uploaded or has expired. Check the validity of your development and production certificates. |
messaging/mismatched-credential |
The credential used to authenticate this SDK does not have permission to send messages to the device corresponding to the provided registration token. Make sure the credential and registration token both belong to the same Firebase project. See Add Firebase to your app for documentation on how to authenticate the Firebase Admin SDKs. |
messaging/authentication-error |
The SDK couldn't authenticate to the FCM servers. Make sure you authenticate the Firebase Admin SDK with a credential which has the proper permissions to send FCM messages. See Add Firebase to your app for documentation on how to authenticate the Firebase Admin SDKs. |
messaging/server-unavailable |
The FCM server couldn't process the request in time. You should
retry the same request, but you must:
|
messaging/internal-error |
The FCM server encountered an error while trying to process the
request. You could retry the same request following the requirements
listed in the earlier messaging/server-unavailable row. If the
error persists, please report the problem to our
Bug Report support channel.
|
messaging/unknown-error |
An unknown server error was returned. See the raw server response in the error message for more details. If you receive this error, please report the full error message to our Bug Report support channel. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-06-12 UTC.