Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

591
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda