Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
frphotos
7 years agoExplorer | Level 4
C# API call "https://api.dropboxapi.com/2/files/list_folder" 400 (Bad Request)
I am getting (400) Bad Request from the below call in c#.
string Url = "https://api.dropboxapi.com/2/files/list_folder";
using (WebClient client = new WebClient()) { NameValueCollection values = new NameValueCollection(); string datastring = "path="; client.Headers.Add("Authorization", "Bearer MYTOKEN"); client.Headers.Add("Content-Type", "application/json"); string retval = client.UploadString(Url, "POST", datastring); }
Not sure why it is giving 404. I searched online without any solution to this problem.
I changed the
string datastring = "path=";
string datastring = "path=''";
It also not working
2 Replies
Replies have been turned off for this discussion
- Greg-DB7 years ago
Dropbox Community Moderator
Can you print out the response body? It should contain a more useful error message. - frphotos7 years agoExplorer | Level 4
Thanks Greg,
I scrapped the idea of using the API call. Instead I am using the .Net SDK method to call the api.
Thanks for the help.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!