cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get metadata for files and folders in Dropbox REST API v2

Lakshmi New member | Level 2
New member | Level 2
curl -X GET https://api.dropboxapi.com/1/metadata/auto --header "Authorization: Bearer <access token redacted>"

 The above endpoint will be used for get metadata in dropbox v1 API.

 

How to get metadata for folders in Dropbox REST API v2?

5 Replies 5

Re: How to get metadata for files and folders in Dropbox REST API v2

Dropboxer
Dropboxer

In Dropbox API v2, you can get the metadata for an item using /files/get_metadata. You can list the files and folders under a particular path using /files/list_folder and /files/list_folder/continue.

 

By the way, I redacted it from your post, but for the sake of security, you should disable that access token that you posted. You can do so by revoking access to the app entirely, if the access token is for your account, here:

 

https://www.dropbox.com/account/security

 

Or, you can disable just this access token using the API:

 

v1: https://www.dropbox.com/developers/core/docs#disable-token
v2: https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke

 

Re: How to get metadata for files and folders in Dropbox REST API v2

mrramos New member | Level 2
New member | Level 2

Hi Greg, I have a code in vb.net to access the list of files in the folder in v1, I am using this url "https://api.dropboxapi.com/1/metadata/auto{0}?access_token={1}" I supply the {0} for the folder path and the {1} for my token. do you have an updated uri that I can use to still populate and get the result for v2? Thank you

Re: How to get metadata for files and folders in Dropbox REST API v2

Dropboxer
Dropboxer

@mrramos If you need the file listing under a folder, you should use /files/list_folder and /files/list_folder/continue. API v2 isn't a drop-in recplament for API v1, so you'll need to make code changes. There are curl examples in the documentation for those showing how to call them.

Re: How to get metadata for files and folders in Dropbox REST API v2

djomoutresor1
Explorer | Level 3

can have a sample example of code to get metadata in angular 7??

Re: How to get metadata for files and folders in Dropbox REST API v2

Dropboxer
Dropboxer

@djomoutresor1 I don't have a sample to share for Angular in particular. Please refer to the HTTP documentation for whichever method(s) you need, e.g., /files/get_metadata, /files/list_folder, or /files/list_folder/continue, for information on how to call them, including curl examples, so you can write the relevant code for whatever HTTP client you're using.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?