title: Firebase Cloud Messaging Missing Registration
body: <p>Hey I just added FCM to my new Website. Now I want to send notifications from my android app. Everything works fine when I do this with postman. Here are my params:</p>
  
  <pre><code>                @Override
                  protected Map&lt;String,String&gt; getParams(){
                      Map&lt;String,String&gt; params = new HashMap&lt;String, String&gt;();
                      Foo foo = new Foo();
                      Notification notification = new Notification();
                      foo.to="[key]";
                      notification.title="foo";
                      notification.body="abc";
                      foo.notification=notification;
                      Gson gson = new Gson();
                      String gg = gson.toJson(foo);
                      params.put("foo",gg);
                      Log.d("PAARAMS",gg);
                      return params;
                  }
  </code></pre>
  
  <p>So my params look like this:</p>
  
  <blockquote>
    <p>{"notification":{"body":"abc","title":"foo"},"to":"key"}</p>
  </blockquote>
  
  <p>I also added custom header like this:</p>
  
  <pre><code>               @Override
                  public Map&lt;String, String&gt; getHeaders() throws AuthFailureError {
                      Map&lt;String,String&gt; params = new HashMap&lt;String, String&gt;();
                      params.put("Authorization", "key=[key]");
                      return params;
                  }
  </code></pre>
  
  <p>But all I got as Response is <strong>MissingRegistration</strong></p>
  
  <p>When I add </p>
  
  <blockquote>
    <p>params.put("Content-Type", "application/json");</p>
  </blockquote>
  
  <p>I get <strong>BasicNetwork.performRequest: Unexpected response code 400 for <a href="https://fcm.googleapis.com/fcm/send" rel="nofollow noreferrer">https://fcm.googleapis.com/fcm/send</a></strong></p>
  
  <p>This is my request response where I get the error:</p>
  
  <pre><code>StringRequest postRequest = new StringRequest(Request.Method.POST, "https://fcm.googleapis.com/fcm/send",
                      new Response.Listener&lt;String&gt;()
                      {
                          @Override
                          public void onResponse(String response) {
                              // response
                              Log.d("Response", response);
                          }
                      },
  </code></pre>
  
  <p>The full project is on <a href="https://github.com/Gnadi/Dinner" rel="nofollow noreferrer">github</a></p>