Firebase Error: Auth error from APNS or Web Push Service

后端 未结 3 1619
一整个雨季
一整个雨季 2021-01-11 14:46

After running the following line in node-js:

import * as admin from \"firebase-admin\";
import * as serviceAccount from \"../../firebase_service_account_key.         


        
3条回答
  •  一整个雨季
    2021-01-11 15:27

    Did you call admin.initializeApp()?

    There are many official samples.

    See:

    • https://github.com/firebase/functions-samples/blob/master/fcm-notifications/functions/index.js#L20
    • https://github.com/firebase/functions-samples/tree/master/fcm-notifications
    • https://github.com/firebase/functions-samples
    • https://github.com/firebase/quickstart-js/tree/master/messaging

提交回复
热议问题