Edujugon / PushNotification

PHP and Laravel Package to send push notifications to Android and IOS devices.
MIT License
478 stars 159 forks source link

Multiple Api Keys #128

Closed cyberdrunk2069 closed 3 years ago

cyberdrunk2069 commented 3 years ago

Im trying to use the library to send notifications to two different apps, i use the ->setApiKey() command but fcm responds with a : Client error: POST https://fcm.googleapis.com/fcm/send resulted in a 401 INVALID_KEY

` $push = new PushNotification('fcm');

                $feedback = $push->setMessage([
                    'notification' => [
                        'title' => "Alerta de sincronización",
                        'body' => "Se han registrado nuevas asistencias en el sistema.",
                        'sound' => 'default'
                    ]])
                    ->setApiKey(env("FCM_SECOND_KEY"))
                    ->setDevicesToken($clients_token)
                    ->send()
                    ->getFeedback();`