We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
John O.25
11 years agoNew member | Level 1
VB.Net Business API web service trouble
I am just getting started working on some tools to synchronize accounts with dropbox via the Business API, but I am having some trouble getting it working correctly. I am just simply trying to verify the web services at this point. I know that I am on the right track because it works as expected with SoapUI, but passing the data this way doesn't work. I suspect that my problem is that it isn't properly passing the Json blank line, {}, but why not? Any tips? For what it is worth, it is shooting back a 400 bad request. I can reproduce this same problem by not including the {} in SoapUI. I tested using ChilkatDotNet libraries with the postjson2 method and it works as expected, but I would rather not purchase the library for something that should just work.
Dim postdata As String = "{}"
Dim conn As New Net.WebClient
conn.Headers("Content-Type") = "application/json"
conn.Headers("authorization") = "bearer <validnumberhere>"
Dim responseText As String = conn.UploadString("https://api.dropbox.com/1/team/get_info", postdata)
2 Replies
Replies have been turned off for this discussion
- Steve M.11 years ago
Dropbox Staff
What's the actual body of the 400 response? (You may have to catch a
WebExceptionor the like and then pull out the response from there.) Generally the 400 will tell you the issue.I think the issue here may be the
Authorizationheader. You're using a lowercase b in "bearer" instead of the uppercase B in "Bearer". - John O.2511 years agoNew member | Level 1
Well, that was dumb. You're absolutely correct. Changing to Authorization: Bearing <id> works properly. Thanks. :-)
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!