Where can I find my Firebase reference URL in Firebase account?

前端 未结 8 615
半阙折子戏
半阙折子戏 2021-02-06 23:07

In the third last line of the below code, how can I find the firebase URL. I am not able to find it. Can anyone provide me the best link on how to setup firebase facebook login

相关标签:
8条回答
  • 2021-02-06 23:19

    Update: UI of firebase has been changed so follow below steps



    0 讨论(0)
  • 2021-02-06 23:22

    NOTE: Same for both old and new UI of the firebase.

    1. Go to Authentication Tab and click on WEB SETUP button on the right upper side of the screen.

    2. Now you will see a dialog box opened, you can see a lot of information fields in it and you will also be able to see a field databaseUrl, this is your required field.

    0 讨论(0)
  • 2021-02-06 23:26

    If you haven't created Firebase account already, Just Create it first. Head over to console and add a new App over there if not added. If you already got an app just click on it and go to dashboard.

    In Dashboard click on Database and you will see the Firebase Reference URL over there. Refer to below Screenshot

    I hope it helps you.

    0 讨论(0)
  • 2021-02-06 23:32

    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'
    
    0 讨论(0)
  • 2021-02-06 23:36

    As Neeraj Chand said: Now there are two kinds of databases on firebase - firestore and Realtime Database. If you are on firestore mode (default) then u might not find the url to db directly. Switch to Realtime Database from the blue dropdown on the top and you will get the url watch this image

    0 讨论(0)
  • 2021-02-06 23:37

    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.

    0 讨论(0)
提交回复
热议问题