Firebase Cloud Messaging different keys

后端 未结 1 359
礼貌的吻别
礼貌的吻别 2020-12-02 01:46

Whats is the current key generated in google_services.json file when making the project. What is the difference between current key, web API key, and server key

相关标签:
1条回答
  • 2020-12-02 02:41

    There is no documentation as of the moment that clearly discusses what values are found in the google-services.json file. Although this answer pretty much gives you an idea on what it is and what it does.

    As for the specific details you were asking for:

    • current key - nothing is explicitly stated anywhere in the docs where it is used, however, among the 3 services where the google-services.json was originally used for before Firebase (Google Sign-in, Analytics, GCM), I'm guessing it would be between Google Sign-in and Analytics. As also mentioned by @DiegoGiorgini here:

    The api_key value in google-services.json is not used by FCM. (it is used by other Firebase libraries)

    So it can be for a separate Google non-Firebase or Firebase service.

    • Web API Key - this one I haven't had a chance to use before. However, I've seen other posts wherein this specific API key is used often on Web apps related to Firebase (possibly also for Auth purposes?), but I'm not entirely sure.

    • Server Key - as per the docs:

    A server key that authorizes your app server for access to Google services, including sending messages via Firebase Cloud Messaging.

    I also tried to look around the Firebase Console on where the current key is visible, but it doesn't seem to be there.

    0 讨论(0)
提交回复
热议问题