Firebase Cloud Messaging replaced the server keys with Tokens for sending notifications/messages

前端 未结 2 1883
被撕碎了的回忆
被撕碎了的回忆 2021-02-15 16:21

I am developing a demo app using Firebase Cloud Messaging. However, I am facing issues with the Firebase server key. Today morning I noticed that my server key got replaced with

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-15 16:54

    I checked the Firebase release notes, but can't find any roll out regarding this change. However, looks like the server key will be deprecated soon and will be replaced by the FCM token.

    If you're having issues using the server key, then consider using the FCM token now.

    Basically, you'll just need to change the value of the authorization key in the request header when sending messages to client apps.

    Content-Type:application/json   
    Authorization:key=XXXXXXXXX:APA91bHVdTcAQGdFc5bIyK_WExwd5U6uJ....
    

提交回复
热议问题