title: firebase cloud messaging Request contains an invalid argument
body: <p>I am getting error while sending message using <code>Firebase</code> cloud messaging admin <code>API</code>.</p>
  
  <p>Error message is below</p>
  
  <blockquote>
    <p>Caused by: com.google.api.client.http.HttpResponseException: 400 Bad Request
        {
          "error": {
            "code": 400,
            "message": "Request contains an invalid argument.",
            "errors": [
              {
                "message": "Request contains an invalid argument.",
                "domain": "global",
                "reason": "badRequest"
              }
            ],
            "status": "INVALID_ARGUMENT"
          }
        }</p>
  </blockquote>
  
  <p>Let me put my admin configuration here..</p>
  
  <pre><code>FileInputStream serviceAccount = new FileInputStream("My service accout file.json");
  
  FirebaseOptions options = new FirebaseOptions.Builder().setCredentials(GoogleCredentials.fromStream(serviceAccount))
                      .setDatabaseUrl("https://deliveryeat-1aa42.firebaseio.com").build();
  
  FirebaseApp.initializeApp(options);
  </code></pre>
  
  <p>Message sending code is below</p>
  
  <pre><code>// This registration token comes from the client FCM SDKs.
  String registrationToken = "YOUR_REGISTRATION_TOKEN";
  
  // See documentation on defining a message payload.
  Message message = Message.builder().putData("score", "850").putData("time", "2:45").setToken(registrationToken).build();
  
  // Send a message to the device corresponding to the provided
  // registration token.
  String response = FirebaseMessaging.getInstance().sendAsync(message).get();
  // Response is a message ID string.
  System.out.println("Successfully sent message: " + response);
  </code></pre>
  
  <p>maven dependencies that i am using is following</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.google.firebase&lt;/groupId&gt;
      &lt;artifactId&gt;firebase-admin&lt;/artifactId&gt;
      &lt;version&gt;5.9.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>So can anyone help me in this? What am I doing wrong?</p>