firebasegoogle-cloud-messagingfirebase-cloud-messaging

Firebase messaging, where to get Server Key?


Firebase allows us to send notification messages via our own application by making POST request.

This tutorial, gives to us instructions how to make this request. However, there is Authorization field in header where I must to place my own Server key.

Where I can get this Server key? There are no instructions for this.


Solution

  • Update (2024): this server key is no longer available as the API that requires has been sunset. See the documentation on migrating to the v1 API to learn more about its replacement API (which has been available since 2017).

    Old answer 👇

    Solution:

    1. Click the Settings (Cog wheel) icon next to your project name at the top of the new Firebase Console, as per screenshot below: enter image description here
    2. Click Project settings.
    3. Click on the Cloud Messaging tab.
    4. The key is right under Server Key. enter image description here