title: What should I specify for Authorization key in Firebase Cloud Messaging
body: <p>Can you guys help me (and others who are just as frustrated as I am) to get how Google Firebase works straight? The documentation is so confusing that it makes me feel outright an idiot.</p>
  
  <p>Here is the thing. I am simply trying to send a push message to the users of my Cordova app, noticing them about an update or something. In the good old times (maybe a few weeks ago) it was simply called a push message. Now there is this Firebase thing, they changed and renamed everything. I guess what I need is currently called Notifications, yet there is also Cloud Messaging and I don't really see what is the exact difference.</p>
  
  <p>Then there is a total confusion of terminology. Apparently there is a https API to send notifications, but it's poorly documented. There are a couple of sites explaining it, but they don't seem to reach a consensus on terminology. Some mention an "API key", others an "authentication key", Google itself calls it an "authorization key", but when I look into my project settings on the console I see a "server key" and an "app ID" while the google_services.json file contains a "private_key_id". So there is a good amount of WTF.</p>
  
  <p>Can someone clarify what the heck should I supply here? This is how a POST request should be formulated to Firebase API:</p>
  
  <pre><code>https://fcm.googleapis.com/fcm/send
  Content-Type:application/json
  Authorization:key=AIzaSyZ-1u...0GBYzPu7Udno5aA  &lt;-- WHAT IS THIS?
  
  { "data": {
      "score": "5x1",
      "time": "15:10"
   },
    "to" : "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1..." &lt;-- AND THIS?
  }
  </code></pre>
  
  <p>What goes to "Authorization"? What goes to the "to" value if I want to send my notification to all users, and what if I want to target a specific group? (For starters I'd be happy if it simply arrived to every device.) Is there a good documentation for these parameters?</p>
  
  <p>Furthermore seemingly Google assumes everybody works in Java and supplies Java examples only. At least I haven't found anything usable for PHP, Node.js or plain JavaScript. There are plenty of examples for all the functions I don't need.</p>
  
  <p>UPDATE: I just found that the "Authorization" should be the "Server Key" found on the Firebase console under my project's Cloud Messaging tab. (Good thing they didn't hide it too much.) Still, if I send a POST from PHP with cURL, it returns an empty response with HTTP code 0.</p>