Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

403
Visualizações
How to get access token for image URL of firebase storage?

I was trying to get the Image URL token from firebase storage. I was able to generate the full URL of the image stored in firebase storage but without that token, I can not access it.

I am using Nodejs v16.

fullURL = https://firebasestorage.googleapis.com/v0/b/first-project-17ec7.appspot.com/o/lp.png

const storage = require("firebase/storage");

let storageRef = await storage.ref(fullURL);
storageRef.getDownloadURL().then(function(url) {
   console.log(url);
});

Output:

error :  TypeError: storageRef.getDownloadURL is not a function
at download (/Users/turinganalytics/Development/transform/src/utils/download.js:51:16)
at async Object.getBuffer (/Users/turinganalytics/Development/transform/src/utils/origin.js:315:30)

Expected Output: https://firebasestorage.googleapis.com/v0/b/first-project-17ec7.appspot.com/o/lp.png?alt=media&token=6d3766fd-b043-4252-8783-b1f7f260d5fd

There are no set of rules in the firebase console.

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write: if request.auth != null;
    }
  }
}

Is there any node js library for firebase that I can retrieve that unique token.?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda