Fixed get_url to return valid download link for service accounts. For multiple issues regarding 403 error.
In case a service account was provided, call generate_signed_url endpoint instead of the default logic, to get a valid PUBLIC download link.
By default, set the link expiration to 12 hours. For custom value, optional expiration parameter can be provided.
Fix for these issues regarding 403 error if service account being used was the cause of the issue:
218, 142, 100
Sample code used for testing:
import pyrebase
config = {} # set all the keys including "serviceAccount"
firebase = pyrebase.initialize_app(config)
storage = firebase.storage()
file = storage.child("cat.jpg") # set the correct path
print(file.get_url())
Output:

Hi there, I've initiated a project to maintain this library, and I'll be using your solution to fix the mentioned bug. I'll co-author you in the commit of the fix, as I've modified it a bit. Feel free to reach me using my email displayed in my profile.
Repo: firebase-rest-api available in PyPI
best regards