We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
fazalabbas
6 years agoExplorer | Level 3
How to Show image of dropbox in asp.net C#
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
Fazal Abbas
6 years agoNew 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 Community Moderator
6 years ago[Cross-linking for reference: https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-Show-image-of-dropbox-in-asp-net-C/td-p/441262 ]
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.)
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!