I am trying to upload a picture to my firebase storage account, but whenever I run the code, I am having a 403 HTTP error: "The project to be billed is associated with an absent billing account". Note that I am using the free subscription (spark plan), so this question is not similar to: Google Cloud Storage bucket throws error "The project to be billed is associated with a closed billing account."
A more verbose error:
"error": {
"code": 403,
"message": "The project to be billed is associated with an absent billing account.",
"errors": [
{
"message": "The project to be billed is associated with an absent billing account.",
"domain": "global",
"reason": "accountDisabled",
"locationType": "header",
"location": "Authorization"
}
]
}
Here is my code in Python:
import firebase_admin
from firebase_admin import credentials, storage
import os
cred = credentials.Certificate(os.getenv("FIREBASE_CREDS"))
firebase_admin.initialize_app(cred)
bucket = storage.bucket('profile_pictures')
blob = bucket.blob("test_image.jpg")
blob.upload_from_string(test_image_path)
Is the problem coming from my python code, or from some settings I need to fix in firebase? With the Spark plan, we are supposed to have some free storage (and for now, I didn't store anything ...)