I have setup a Firebase account and a database.
I have copied the config with the API key into my Python code.
I still get a 401 Permission denied error on Python 3.5
import pyrebase
config = {
"apiKey": "*****",
"authDomain": "***-bot.firebaseapp.com",
"databaseURL": "https://***-bot.firebaseio.com",
"storageBucket": "ebo-bot.appspot.com"
}
firebase = pyrebase.initialize_app(config)
db = firebase.database()
data = {"name": "Mortimer 'Morty' Smith"}
db.child("users").child("Morty").set(data)
My database rules are set to:
{
"rules": {
".read": "auth != null",
".write": "auth != null"
}
}