Search code examples
firebasefirebase-cloud-messagingtoken

Firebase Cloud Messaging Token


I'm following the tutorial with Firebase Cloud Messaging. The tutor is using token from Project Settings -> Cloud Messaging. This is his screen: enter image description here

But I only have sender ID: enter image description here

What I missed here? What should I do to get this token or maybe create one?


Solution

  • It seems you're following a tutorial that is using the Legacy FCM API.

    Just click the icon to go to Cloud console. enter image description here

    Then, enable the Cloud Messaging API. enter image description here

    After this, it will show the server key in the Cloud Messaging tab.

    However, I would recommend using the HTTP v1 API as this has the updated server features. You can read more about it here. This requires a different setup than the Legacy API but you can follow this guide on how to set it up.