Replies: 2 comments 1 reply
-
Have you also ensured that the service account and the registration token belong to the same project? The code looks fine, but I want to add that the Sender ID and Project ID are two different things and a Sender ID is not used within the SDK. It's only the service account's project ID that matters. |
Beta Was this translation helpful? Give feedback.
-
Does the registration token is same as server key that could be found on https://console.firebase.google.com/u/1/project/fooddelivery-cc39b/settings/cloudmessaging/ link? This is the service account data |
Beta Was this translation helpful? Give feedback.
-
I checked the project number and sender id that are the same. Server key also is checked and updated.
the cloud api also is enabled https://console.cloud.google.com/api.
what could make this error?
here is the code
` $title = 'My Notification Title';
$body = 'My Notification Body';
$notification = Notification::create($title, $body);
`
and error :
SenderId mismatch in file /home/pc/Desktop/new PC/devfood/vendor/kreait/firebase-php/src/Firebase/Exception/Messaging/AuthenticationError.php on line 22
Beta Was this translation helpful? Give feedback.
All reactions