messaging/invalid-argument API Origin: Application & API OSI layer 7 · Application Last updated 28 Nov 2026

Firebase Cloud Messaging: messaging/invalid-argument — Invalid registration token / payload

FCM rejected the message because the token or payload is malformed.

Exact message you may see Invalid registration tokenThe registration token is not a valid FCM registration token
Seen on: Firebase

Meaning

Data payload values must be strings, topics need the right format, and tokens must be real FCM registration tokens (not APNs tokens).

Common causes

  • APNs token used instead of FCM token
  • Data payload contains non-string values
  • Payload over 4 KB
  • Wrong topic name

⚡ Quick fix

  1. Use the FCM registration token
  2. Convert every data value to a string
  3. Trim the payload

Detailed fix by platform

Node.js

  1. data: Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, String(v)]))

How to diagnose

  1. Token — FCM token?
  2. Data — All strings?
  3. Size — Under 4 KB?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

Cannot connect to host — aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.example.com:443 ssl:default (API)Cannot connect to hostconcurrent_requests_limit — API Error: Too many concurrent requests (concurrency limit reached) (API)concurrent_requests_l…CORS — CORS Error: No 'Access-Control-Allow-Origin' header is present (API)CORSjob not found — API Error: Job / operation not found or expired (async task ID unknown) (API)job not foundPersistedQueryNotFound — GraphQL: PersistedQueryNotFound — Apollo persisted query hash not in cache (API)PersistedQueryNotFoundServerDisconnectedError — aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected (API)ServerDisconnectedErr…subscription key — Azure API Management: 401 Access denied due to missing subscription key (API)subscription keymessaging…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.