cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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: 

VB.Net Business API web service trouble

VB.Net Business API web service trouble

John O.25
New member | Level 1

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 2

Re: VB.Net Business API web service trouble

Steve M.
Dropboxer

What's the actual body of the 400 response? (You may have to catch a WebException or 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 Authorization header. You're using a lowercase b in "bearer" instead of the uppercase B in "Bearer".

Re: VB.Net Business API web service trouble

John O.25
New member | Level 1

Well, that was dumb. You're absolutely correct. Changing to Authorization: Bearing <id> works properly. Thanks. 🙂

Who's talking

Top contributors to this post

  • User avatar
    John O.25 New member | Level 1
  • User avatar
    Steve M. Dropboxer
What do Dropbox user levels mean?
Need more support?