benwilkins / laravel-fcm-notification

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

Getting unauthrized response #36

Closed oseintow closed 5 years ago

oseintow commented 5 years ago

I keep getting this error. What could i be doing wrong.

[2019-04-18 22:26:11] local.ERROR: Client error: `POST https://fcm.googleapis.com/fcm/send`
 resulted in a `401 Unauthorized` response:
<HTML>
<HEAD>
<TITLE>Unauthorized</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Unauthorized</H1>
<H2>Erro (truncated...)
 {"exception":"[object] (GuzzleHttp\\Exception\\ClientException(code: 401): Client error: `POST 
https://fcm.googleapis.com/fcm/send` resulted in a `401 Unauthorized` response:
junaid-A-khan commented 5 years ago

did you set fcm key in config/services.php and clear out cache of your app?

oseintow commented 5 years ago

It works now