You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Coder
9 years agoExplorer | Level 4
Dropbox requests via a server
We need users to login to our system only and access one dropbox account only. In other words many users access the same dropbox account. That account is a company account with shared readonly docume...
Coder
Explorer | Level 4
I'm trying to do this:
curl -X POST https://content.dropboxapi.com/2/sharing/get_shared_link_file --header "Authorization: Bearer i8QD8..." --header "Dropbox-API-Arg: {\"url\": \"https://www.dropbox.com/s/g1mijjb5deejf6h/Test.txt?dl=0\"}"
that works. Doing it In .NET:
string _url = "https://content.dropboxapi.com/2/sharing/get_shared_link_file"; client.Headers.Add("Authorization", "Bearer i8Q......"); string _dropBoxParams = "{\"url\": \"https://www.dropbox.com/s/g1mijjb5deejf6h/Test.txt?dl=0\"}"; client.Headers.Add("Dropbox-API-Arg", _dropBoxParams); byte[] _responsebytes = client.UploadValues(_url, "POST", _postParameter);
but it gives: The remote server returned an error: (400) Bad Request.
What is the problem?
Greg-DB
8 years agoDropbox Staff
If you're going to use a single account like this, you should embed the access token like you do in your most recent post, not via username/password.
If you're doing this in .NET, we highly recommend using the official API v2 .NET SDK. That would do much of the work for you. If you use that, to make this call you would use the GetSharedLinkFileAsync method.
Otherwise, if you do want to make the call directly, without using the SDK, print the body of the response. That will contain more error information indicating what the issue is.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,919 PostsLatest Activity: 16 hours ago
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 or Facebook.
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!