You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
Looks like this project does not work anymore with new FCM server key.
Running at PHP 7 and fixing incorrect "?>" in one of scripts I was finally getting some output from service.php like below.
As for service.php variable 'api_key' - looks like FCM is expecting new "Server key" (like AAAAfJORI48:APA91...), not "Legacy server key" (like AIzaSyDX..) from its console - Cloud messaging. With new key I have no output at all.
With old key I got error
=== Connecting to fcm-xmpp.googleapis.com:5235... === 07:33:32 === === Sent 129 bytes === 07:33:32 === === Read 152 bytes === 07:33:32 === === Read 197 bytes === 07:33:32 === X-OAUTH2X-GOOGLE-TOKENPLAIN === Sent 169 bytes === 07:33:32 === ADUzNTA1MTcwNzI3OUBnY20uZ29vZ2xlYXBpcy5jb20AQUl6YVN5QzFNOHJUa2tMVnBYb0NPT055bklodmJr === Read 194 bytes === 07:33:32 === Received BROWSER API key. Only SERVER API keys are accepted. === Read 16 bytes === 07:33:32
I got in touch with FB support and got reply:
Based off the error, looks like you're using the wrong key. You should be using the FCM server key. This can be found in the Firebase Console under the Project Settings -> Cloud Messaging.
@baudev I tried to use all of them, without luck, php log shows error PHP Notice: Undefined property: stdClass::$data in /Applications/MAMP/htdocs/stream.php on line 167
Looks like this project does not work anymore with new FCM server key.
Running at PHP 7 and fixing incorrect "?>" in one of scripts I was finally getting some output from service.php like below.
As for service.php variable 'api_key' - looks like FCM is expecting new "Server key" (like AAAAfJORI48:APA91...), not "Legacy server key" (like AIzaSyDX..) from its console - Cloud messaging. With new key I have no output at all.
With old key I got error
=== Connecting to fcm-xmpp.googleapis.com:5235... === 07:33:32 === === Sent 129 bytes === 07:33:32 === === Read 152 bytes === 07:33:32 === === Read 197 bytes === 07:33:32 === X-OAUTH2X-GOOGLE-TOKENPLAIN === Sent 169 bytes === 07:33:32 === ADUzNTA1MTcwNzI3OUBnY20uZ29vZ2xlYXBpcy5jb20AQUl6YVN5QzFNOHJUa2tMVnBYb0NPT055bklodmJr === Read 194 bytes === 07:33:32 === Received BROWSER API key. Only SERVER API keys are accepted. === Read 16 bytes === 07:33:32
I got in touch with FB support and got reply:
Based off the error, looks like you're using the wrong key. You should be using the FCM server key. This can be found in the Firebase Console under the Project Settings -> Cloud Messaging.
see details at https://stackoverflow.com/questions/50004547/firebase-cloud-messaging-returns-received-browser-api-key-only-server-api-keys
The text was updated successfully, but these errors were encountered: