2

I wanted to know how long lived the firebase storage URL's are. I'm using firebase storage to host some static images. Currently using the file references to get the url's in app. But would like to skip this step and just use the URL's instead. Does anyone know what if anything will cause first part of the URL to change? (https://firebasestorage.googleapis.com/v0/b/)

Total URL https://firebasestorage.googleapis.com/v0/b/{Project_ID}.appspot.com/o/{FILE_PATH}?alt=media&token={TOKEN}

2 Answers 2

3

The first part of the URL (https://firebasestorage.googleapis.com/v0/b/) will only change if the Firebase Storage API ever changes. Since this hasn't happened since its release in May 2016, and isn't planned to happen at any point at the moment, we can be certain it is a really infrequent occurrence.

The {Project_ID}.appspot.com/o/ will only change if you have a different project. For an existing project this will never change.

The {FILE_PATH} is the path to your file, so will only be different when referring to a different file.

And token={TOKEN} will only stop working if you revoke the token, as answer here: Firebase Storage getDownloadUrl's token validity

Sign up to request clarification or add additional context in comments.

1 Comment

Just to clarify, the part after the /b/ is the bucket name and does not have to be in {Project_ID}.appspot.com format. https://firebasestorage.googleapis.com/v0/b/{BUCKET_NAME}/o/{FILE_PATH}?alt=media&token={TOKEN}
1

A download URL will last forever, or until its specific token is rejected from the Firebase console.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.