Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8211011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:16:51+00:00 2026-06-07T10:16:51+00:00

I am trying to build a web UI for users to navigate his/her Google

  • 0

I am trying to build a web UI for users to navigate his/her Google Drive and select one or more documents to be referenced later on in a website from a DB. I am currently building a web interface using PHP.

The problem I am facing is that I cant find a single function to get a list of files by folder Id.

I tried using:

$service->children->listChildren($rootFolderId)

…but that will only give the files reference ID of the files within the folder (the so called children resource item), which means I have to loop through those files and create a call for each one of them in order to get all the metadata I need for my UI.

Unfortunately..

$service->files->list()

..will list ALL my files with no filtering options by folder.

I would like to know if there is an efficient way of extracting a folder file list from a single call to the Drive server. I actually remember being able to perform this taks over the old Google DOC API.

Thank you very much for your help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T10:16:52+00:00Added an answer on June 7, 2026 at 10:16 am

    NB This answer uses the v2 API. New applications should write to the v3 API.

    It is now possible to use the drive.files.list endpoint to list files belonging to a specific folder.

    To do so, you can use the ?q= query parameter as follows:

    GET https://www.googleapis.com/drive/v2/files?q="'<FOLDER_ID>' in parents"
    

    In PHP, that would be

    $service->files->list(array('q' => "'<FOLDER_ID>' in parents"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are trying to build an web application that allows users to select appropriate
I am trying to build a web application that requires users to register themselves.
I am trying to build a web application that enables users to refer people
All, I am trying to build a completely UTF-8 web app which allows users
I'm trying to build a web application in which users can invite their friends
I am trying to build a web application where the user can select and
Am trying to build a conversation system for users on a web app am
I'm trying to build a web service using Ruby on Rails. Users authenticate themselves
I'm trying to build a web application that uses an SSL connection. So I
I am trying to build a web application, where I have abstracted logic in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.