404 Not Found when I try to get the data #524
-
Well, I'm trying to connect to Firebase realtime database from php in the following way:
I have also tried with
And
And everything gives the same result... Firebase rules:
When I try to do Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: I am working with : Output of Thanks a lot!! 👍 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thank you for the detailed description! It was said on the discord server that Firebase has changed the way it names the default Realtime Database name on new projects, and I believe (hope 😅) that this is the case here. Could you please check on https://console.firebase.google.com/project/_/database/ what the name of your database is? You can find it right of the 🔗 symbol and it should look something like Once you have that URL, you can configure it in the SDK with the $factory = (new Factory)
->withServiceAccount(../firebase.json)
->withDatabaseUri('https://my-database-name.firebaseio.com');
$database = $factory->createDatabase(); Please let me know if this works 🤞 |
Beta Was this translation helpful? Give feedback.
Thank you for the detailed description! It was said on the discord server that Firebase has changed the way it names the default Realtime Database name on new projects, and I believe (hope 😅) that this is the case here.
Could you please check on https://console.firebase.google.com/project/_/database/ what the name of your database is? You can find it right of the 🔗 symbol and it should look something like
https://<some-string>.firebaseio.com
(By default, the SDK will build this URL from theproject_id
field in your service account JSON file).Once you have that URL, you can configure it in the SDK with the
withDatabaseUri()
method of theFactory
class, so for example: