Dropbox Core Api List All Folders
So I have been playing with Dropbox APIs for awhile. My app is retrieving all the image files from a user's dropbox via Core API. Now I want to improve it a bit by allowing users t
Solution 1:
Using the https://api.dropbox.com/1/metadata/dropbox/<path>
gives you the details of the contents of directory
import requests
...
headers = ... # set up auth
...
params = { 'list' : 'true' }
response = requests.get('https://api.dropbox.com/1/metadata/dropbox/<directory>', params=params, headers=headers)
subdirs = [d['path'] for d in response.json()['contents'] if d['is_dir'] == True]
print(subdirs)
Post a Comment for "Dropbox Core Api List All Folders"