laravel-fcm-notification icon indicating copy to clipboard operation
laravel-fcm-notification copied to clipboard

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

Open AkshayRSI opened this issue 4 years ago • 8 comments

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....

AkshayRSI avatar Aug 26 '20 05:08 AkshayRSI

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

benwilkins avatar Aug 26 '20 14:08 benwilkins

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.

Seedorf161 avatar Oct 14 '20 20:10 Seedorf161

getting the same error any update

jindalAnuj avatar May 16 '21 11:05 jindalAnuj

Getting the same error.

lexjwa avatar Oct 07 '21 10:10 lexjwa

Getting the same error.

aymanalhattami avatar May 06 '22 19:05 aymanalhattami

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

aymanalhattami avatar May 17 '22 16:05 aymanalhattami

@aymanalhattami did you just override without changing something ?

mertayasa avatar May 24 '22 08:05 mertayasa

@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

mertayasa avatar May 24 '22 09:05 mertayasa