benwilkins / laravel-fcm-notification

Laravel FCM (Firebase Cloud Messaging) Notification Channel
MIT License
213 stars 91 forks source link

Client error: `POST https://fcm.googleapis.com/fcm/send` resulted in a `401 INVALID_KEY` response #68

Open AkshayRSI opened 4 years ago

AkshayRSI commented 4 years ago

I am getting above error while sending notification. I dont understand how to resolve it..please help with it. I am getting this error in laravel....

benwilkins commented 4 years ago

According to the error, you have an invalid key. Make sure your keys are set correctly.

Seedorf161 commented 4 years ago

I am getting above error while sending notification. I dont understand how to resolve it..please help with it. I am getting this error in laravel....

Hi, please, how did you solve this? i'm getting the same error and i used the "Server key" seen in the Cloud Messaging tab in Firebase console.

jindalAnuj commented 3 years ago

getting the same error any update

lexjwa commented 3 years ago

Getting the same error.

aymanalhattami commented 2 years ago

Getting the same error.

aymanalhattami commented 2 years ago

The same error happened to me last week, that was because the value of key returned as 0 instead of firebase server key. I solve it by overriding vendor class composer overriding vendor class composer

mertayasa commented 2 years ago

@aymanalhattami did you just override without changing something ?

mertayasa commented 2 years ago

@aymanalhattami never mind, i figured out your solution.. the actual problem is its unable to read fcm key from services.php file. so i override the class as you said and put fcm key in another config file.. then call it.. viola.. it works.. thanks for hinting that