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

242
Vistas
how to open folder of google drive using google drive api in axios/javascript

I am trying to open the folder and see the files inside

const children = await axios.get(
      `https://www.googleapis.com/drive/v3/files/${folder.id}`,
      {
        params: {
          fields: "files(id, name)",
          spaces: "drive",
        },
        headers: {
          authorization: `Bearer ${accessToken}`,
        },
      }
    );

can we open sub folder using folder id? i tried it but it show errors

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Check the q pram search opperators with file.list it will let you list the files with in a folder

q=parents%20in%20%27root%27

Or

curl \
  'https://www.googleapis.com/drive/v3/files?q=parents%20in%20%27root%27&key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --compressed
about 4 years ago · Juan Pablo Isaza Denunciar

0

As google drive doc uses q parameter to get a list of files inside a folder

q:"'{FolderID}' in parents"

so your Axios get request will be like that

const emptyFoldersSearch2 = await axios.get(
      "https://www.googleapis.com/drive/v3/files",
      {
        params: {
          q:"'1VwXsYxTTGid9GIYHzkzD7LPFN5bRUSKD' in parents" ,
        },
        headers: {
          authorization: `Bearer ${accessToken}`,
        },
      }
    );
about 4 years ago · Juan Pablo Isaza 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