web-push-libs / web-push-php

Web Push library for PHP
MIT License
1.71k stars 299 forks source link

Message failed to sent for subscription #207

Closed androidealp closed 5 years ago

androidealp commented 5 years ago

My php 7.2, my xampp server nav: Crhome

My tests resulted in a 400 UnauthorizedRegistration , UnauthorizedRe (truncated...)

I not undestend, if my Subscription work in https://web-push-codelab.glitch.me/

[
    'subscription' => Subscription::create([
        'endpoint' => 'https://fcm.googleapis.com/fcm/send/cihVVqfw8Nw:APA91bHT6pICQ62VrRF6Qann4VsMxVCBYxlxenX0XvdIFlO2zP6nyql4Fqgdod6GKRHu-xk29lOdTZVQT5LaU_8BqA5yh3oc3WqrnCm42MB-n28V23tmciQ8UIXjFk3iH7dc1s9IRAXu', 
        'keys'=>[
            'p256dh'=>'BDDyGtJ9eJXw9RThuOuW7eAOsHW5R0d-uQzeXTrSwRt4kls53LXYKN32EM18TURVs6VBUzkDeoL1KbRvTf9vD6g',
            'auth'=>'thm8i0JQTJO8uiyKK5wgcw'
        ]
    ]),
    'payload' => '{msg:"Teste mensagem"}',
], `
Minishlink commented 5 years ago

You may have wrong VAPID keys