Where can I find my Firebase reference URL in Firebase account?
Solution 1:
You should have done searching by yourself first. Here you are,
- Open Firebase Console
- Select your app, and go to database, marked is the url you need.
For UPDATED UI
Follow the below steps to get it in new UI of Firebase Console:
- Go to Database section
- Tap Cloud Firebase (marked 1 in picture) and select Realtime Database
- Marked 2 is the URL
Solution 2:
In the New UI (Nov-2019)
You need to select project settings in the Left Corner.
Then Scroll Down to Apps Section
Select Config, Then you can get all the information.
Solution 3:
For Firestore I tried this to find get the databaseUrl and it works for me:
Go to Cloud Firestore
tab and take the id as circled in the image.
Then the databaseURL
is https://football-f559a.firebaseio.com
Tested this with Python and Firebase Admin sdk
import firebase_admin
from firebase_admin import credentials, firestore
cred = credentials.Certificate("./firebase-admin.json")
firebase_admin.initialize_app(cred, {
'databaseURL': 'https://football-f559a.firebaseio.com'
})
db = firestore.client()
for k in db.collection("countries").get():
print(k.id, k.to_dict())
Output:
A {'name': 'aaaaa'}
C {'name': 'C2'}
UPDATE:
Apparently I can use any databaseURL and it still works:
'databaseURL': 'https://xxxxx.firebaseio.com'
Solution 4:
When you create you Firebase database, it will be created with a unique URL ending in firebaseio.com. The URL of the database follows the format:
https://<PROJECT_ID>.firebaseio.com/
What you want to do is go to the Database tab, switch from Cloud Firestore (Beta) to Realtime Database using the select button. You will be able to see your DB URL as shown in the following:
I hope this helps!