3

When trying to use the FireBase notification API from Google Playground, "invalid_argument" is returned with a bad request (400) response.

Has anyone already faced this issue ?

POST /v1/projects/project-XXXXX/messages:send HTTP/1.1
Host: fcm.googleapis.com
Content-length: 172
Content-type: application/json
Authorization: Bearer ya29.GlsmBVbYFheJHcCs7EWdiOeBmMblU-9lgeTy4x_L3W2saI21mUV87UilRMtWQyRwHdQRrxTKEm0rdrwymqyWHpMxXBZZPKeOAX4n2o9GQzZp-wmyVEksoXXrAPOO
{
  "message":{
    "token":"bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1",
    "notification":{
      "title":"My Title",
      "body":"This is the body!"
    }
  }
}

HTTP/1.1 400 Bad Request
Content-length: 127
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
Transfer-encoding: chunked
Vary: Origin, X-Origin, Referer
Server: ESF
-content-encoding: gzip
Cache-control: private
Date: Mon, 18 Dec 2017 15:41:16 GMT
X-frame-options: SAMEORIGIN
Alt-svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"
Content-type: application/json; charset=UTF-8
{
  "error": {
    "status": "INVALID_ARGUMENT", 
    "message": "Request contains an invalid argument.", 
    "code": 400
  }
}
KENdi
  • 7,576
  • 2
  • 16
  • 31
  • I'm running into exact the same issue. It was working fine up until a few days ago. Can't exactly pinpoint the moment when it went wrong, but right now if I'm sending a message (with the bare minimum – as in the example of the OP) I get an INVALID_ARGUMENT with no further information – tleguijt Dec 20 '17 at 08:48

0 Answers0