I want to use Firebase Cloud Messaging (FCM). but when entering Server key from cloud messaging in firebase I get response :
The ID token or registration token was not not found at index
The ID token or registration token was not not found at index
The ID token or registration token was not not found at index
the server key I use is the same as the one in the firebase console
this my method :
void sendNotification()
{
fbdo.fcm.begin("AAAAJn7rcU0:APA91bECX7dFufaRYc9LzLbSXmIQCFpqmHiJnhg9_h-Mk2W03gaSWPeUmZTxw5235Caqcchm36tyeblsDSFLHyZEfmrA0w9gjTrWtLG6mdprG7tUw8tOUn64ak4W2Emk_Zxxxxxxxxx");
fbdo.fcm.addDeviceToken("fh3SkcqSTFK7zhmjalPS7f:APA91bGeLJG5gtsNIFU4qsf7uiZchQi9-ZkvQlvJZr_cj6fKr1LGYY8rnoqH7iCRLgg7ZQmKFgCYKM5EmGsiK8c5ovXcLNvCrI9kp3ygoTiYEeOX0TudBkZPw-i83-xxxxxxxxxxxx");
fbdo.fcm.setPriority("normal");
fbdo.fcm.setTimeToLive(5000);
fbdo.fcm.setNotifyMessage("Notification", "Hello World!", "firebase-logo.png", "http://www.google.com");
fbdo.fcm.setDataMessage("{\"myData\":\"myValue\"}");
if (Firebase.sendMessage(fbdo, 1))
{
//Success, print the result returned from server
Serial.println(fbdo.fcm.getSendResult());
}
else
{
//Failed, print the error reason
Serial.println(fbdo.errorReason());
}
}
I want to use Firebase Cloud Messaging (FCM). but when entering Server key from cloud messaging in firebase I get response :
the server key I use is the same as the one in the firebase console this my method :
can anyone help? thanks