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

585
Visualizações
How to get google drive folders path

I have authenticated for google drive using passport js

Now I have access token

So I am looking for to get all folders path with their respective folder Id.

I am not aware what parameters need to set to get only folders path and folder id

I am using google-drive library for fetching lists

Here is my code

var googleDrive = require('google-drive')
 var param={}
 googleDrive(accessToken).files().list(params, (err, response, body) => {
                       //fetch folders path
                    })

Thanks.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Try changing

var param={}

to

var param={q: "mimeType='application/vnd.google-apps.folder' and trashed=false"}

With all due respect to the authors of the library you are using, be very careful. Either a library deal with all of Drive's subtleties (eg. following nextPageTokens) or it will cause you problems. The Drive REST API is a very well formed API, and you could just as easily access it using Fetch, which, being Promise based, makes for much cleaner code and allows you to use async await.

over 4 years ago · Santiago Trujillo Relatório
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