cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

How to Show image of dropbox in asp.net C#

How to Show image of dropbox in asp.net C#

fazalabbas
Explorer | Level 3

Hi ... I m working with the Dropbox api using C# . i want to display dropbox folder image to asp.net  C# web page.How i can do it plz help me guys 

3 Replies 3

Greg-DB
Dropbox Staff

Dropbox does offer an API you can use for listing, uploading, and downloading files, among other operations. You can find everything you need to get started with the Dropbox API, including documentation, tutorials, and SDKs here.

 

For .NET in particular, we recommend using the official Dropbox API v2 .NET SDKThe page there has information on how to get started with that, and includes links to a few example apps.

 

For instance, to use that to list the contents of any particular path, you would use ListFolderAsync/ListFolderContinueAsync. There's an example of calling ListFolderAsync here. And to download the data of any particular file, you would use DownloadAsync. There's an example of that here.

Fazal Abbas
New member | Level 2

I have a dropbox api with token and app secret key . the code is giving me error when i fetching data from dropbox folder.

private void getfiles()
{

RequestResult strReq = OAuthUtility.Get
(
"https://api.dropboxapi.com/2/cloud_docs/get_metadata", new HttpParameterCollection
{
{ "Eziline Screenshot/Fazal/07-Jul-20 4:37:22 PM .JPG", "FilePath" },
{ "sl.AewflY8ByI3m3xIEG0-nrBXfze7nGULFcNyS2qPjYrrHGR7Qpv9fkcZJRXxUdLzspinuJqSA", "AccessToken" }
}
);


if (strReq.StatusCode == 200)
{
Image1.ImageUrl = "Eziline Screenshot/Fazal/07-Jul-20 4:37:22 PM .JPG";
}


}

 i have used Nemerio OAuth . it is giving me error

Nemiro.OAuth.RequestException: 'The remote server returned an error: (400) Bad Request.'

Greg-DB
Dropbox Staff

[Cross-linking for reference: https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Show-image-of-dropbox-in-asp-net... ]

 

I see you're getting a 400 error code, but you should also print out the response body itself, as it would contain a more useful error message. We can't provide support for the Nemerio OAuth library itself though, as it's not made by Dropbox.

 

Also, if you want the metadata for any particular file or folder, you should instead call /2/files/get_metadata.

 

By the way, do not share or post your access token. (This one is short-lived though, and would've expired by now, but it looks like you didn't post the whole thing anyway.)

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Fazal Abbas New member | Level 2
What do Dropbox user levels mean?