JtecX JtecX - 1 year ago 191
Android Question

Firebase getDownloadURL Not working Android

Really need help guys, Here is my Firebase Storage Security Rule

service firebase.storage {
match /b/shoppinglist-XXXX.appspot.com/o {
match /{allPaths=**} {
allow read, write;

Here is my Java Code to get a URL Link

storageRef = FirebaseStorage.getInstance().getReference();
pathRef = storageRef.child("MyBook.pdf");

storageRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
public void onSuccess(Uri uri) {
Log.d(tag, "MyDownloadLink: " + uri);

Here is my Error:

StorageException has occurred.
User does not have permission to access this object.
{ "error": { "code": 403, "message": "Developer credentials required." }}
java.io.IOException: { "error": { "code": 403, "message": "Developer credentials required." }}

Can Someone Please Help!

Answer Source

You probably meant to download from pathRef, not storageRef. Downloading from the root of the storage tree is not permitted.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download