1
votes

I am trying to get all folders under a google drive folder using parent folder id

using below api

content.googleapis.com/drive/v3/files/

passing parent id in request body

am able to create files and folders under parent id, but when try to get folder list in parent folder its giving me error as bad request

Note: I am using postman tool

1
Can you show your query? - ziganotschka
this is the api am using content.googleapis.com/driv/v3/… - Daniel
And with this request you can retrieve files but not folders? - ziganotschka
I can't retrieve both files and folders under parent folder using parent id in parameter is there any alternative solutions for this? - Daniel

1 Answers

0
votes

When you want to use a query when listing results, the syntax is '1234567' in parents, not parents=1234567

In your case, the correct syntax would be something like

https://www.googleapis.com/drive/v3/files?q=%2710oCPwjGlp8ArZGP0nk2jnvztniaCRdH4%27%20in%20parents