cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: How to get metadata for files and folders in Dropbox REST API v2 C# using Nemiro.OAuth

How to get metadata for files and folders in Dropbox REST API v2 C# using Nemiro.OAuth

Gopal B.
New member | Level 1

I'm converting Dropbox features from v1 to v2. In Dropbox v1 I'm fetching metadata using the below code-
     RequestResult strReq = OAuthUtility.Get
                           (
                             "https://api.dropbox.com/1/metadata/auto/",
                             new HttpParameterCollection
                            {
                              { "path", "" },
                              { "access_token", "AccessToken" }
                            }
                           );

Now I want to make the same call in Dropbox API v2.I have seen the example mentioned at https://www.dropbox.com/developers/documentation/http/documentation#files-alpha-get_metadata
I couldn't find the proper syntax to get the metadata for files/ folders in v2.If anyone has any idea or sample code how to call the same thing in Dropbox v2 please share.
 

1 Reply 1

Greg-DB
Dropbox Staff

[Cross-linking for reference: https://stackoverflow.com/questions/38091736/how-to-get-metadata-for-files-and-folders-in-dropbox-re... ]

We recommend using the official .NET SDK if possible. The FilesRoutes.GetMetadataAsync method offers the relevant functionality.

If you can't use the SDK, you can use the HTTP endpoint, but instead of that alpha route you linked to, you should use /files/get_metadata.

I don't have any sample code for using OAuthUtility in particular, but the documentation there has an example using curl that you can translate. That is, you need to POST to that endpoint with a body containing JSON with your desired parameters, and you should include the OAuth 2 access token in the Authorization header as shown.

 

Need more support?