DropBox ver 1 API and/or non-MS and not ugly SkyDrive API

sensboston

Recognized Developer
Nov 18, 2009
2,142
797
193
Boston, MA
First, I'd like to wish happy New Year for everybody!

Second, I have a question to xda's developers: is there a working and non-ugly (without involving WebBrowser window) library for WP7 to access DropBox API version 1 (it's important, new apps can't use ver 0 anymore; all codeplex'es libs are using version 0 and seems like nobody planned to improve their non-working stuff).

I'm also interested in non-ugly (as Microsoft Live SDK) access library to SkyDrive, also without WebBrowser (it's a most stupidest and ugly API I've ever seen!).

If you have your own working code, could you please share with me for my new free app? I don't have much time to write my own implementation, and I hope that someone has already done this job.

Thanks!
 

sensboston

Recognized Developer
Nov 18, 2009
2,142
797
193
Boston, MA
I'm sure we can figure out how to get it without using the web browser :). I'll see what I can figure out if you want.
I'm 100% sure it's possible :) I just don't have time to work with the new API (v 1) specs and OAuth. So if you have time and want to implement - it's really will be great! And of course I can help you with testing (using my project).

P.S. BTW, SharpBox designed to use synchronous calls; I don't like this way. IMHO good implementation should be more "WP7-oriented"...
 

sensboston

Recognized Developer
Nov 18, 2009
2,142
797
193
Boston, MA
Isn't that how most apps that use OAuth work?
I don't know, actually, but all Dropbox access libs (API v. 0) are working without showing browser window.

P.S. I've found on the Dropbox devs forum, it's possible (but not a guaranteed) to ask dropbox support team to change your app and secret keys to API version 0.
 

d1k_is

Senior Member
Apr 28, 2009
215
7
0
Brisbane
dkdevelopment.net
I don't know, actually, but all Dropbox access libs (API v. 0) are working without showing browser window.

P.S. I've found on the Dropbox devs forum, it's possible (but not a guaranteed) to ask dropbox support team to change your app and secret keys to API version 0.
Hello,
I'm the developer behind DropNet. Just a bit of background on the change to API v1: Dropbox wanted to support the full oauth spec which actually requires the web login. I know this makes it not as "clean" for the apps but makes it more secure for Dropbox. They have also announced they will be turning off API v0 sometime in the future (Though they have not stated when).

I dont think the authentication is process is too bad, once you get your head around it. Its accepted by users that they will have to login via the website nowadays (Twitter and Facebook do it as well).
 

sensboston

Recognized Developer
Nov 18, 2009
2,142
797
193
Boston, MA
actually requires the web login
What do you mean by that? I don't know term "web login"... If you mean - "I guess it requires a kinda unknown - for me - parameters or headers for HTTP POST/GET request" - I'll agree but it's definitely not a point to display slow loading and ugly web page each time you need an access to your files. Do you know, what is the actual login technique in API 1 (I mean what kind of params , headers, cookies are used, not a "web login" stuff)?
 
Last edited:

d1k_is

Senior Member
Apr 28, 2009
215
7
0
Brisbane
dkdevelopment.net
What do you mean by that? I don't know term "web login"... If you mean - "I guess it requires a kinda unknown - for me - parameters or headers for HTTP POST/GET request" - I'll agree but it's definitely not a point to display slow loading and ugly web page each time you need an access to your files. Do you know, what is the actual login technique in API 1 (I mean what kind of params , headers, cookies are used, not a "web login" stuff)?
Hmmm, sounds like you have the wrong idea about the authentication.
First of all the authentication is a 3 step process (for the developer), step 1 is to get a request token from the API, step 2 is to browse to the site (using the request token as page parameters) so the user can login, step 3 is authorizing the request token (changing it to an access token).

Once you get an access token you can save that in your app and use it forever (or until the user removes access from your app) this means the user will only have to login the first time they run the app as you will have their access token saved locally which you can use to access the API functions (but the access token only works with the API Keys it was created with).

For more info check out the DropNet documentation for the Authentication process (http://dkdevelopment.net/what-im-doing/dropnet/) Theres also a sample app in the Github project.
 

sensboston

Recognized Developer
Nov 18, 2009
2,142
797
193
Boston, MA
It sound like you have no idea how the browsers works... "Browse", "navigate" - it's good terms for users, not for developers. From a technical point of view, browser makes an HTTP or HTTPS request to the host and receive a response. So, what you (and dropbox dev and marketing team) called "token" is a text/binary data, part of the response.

So, what is preventing you to make a direct call to dropbox web service using WebRequest?

P.S. I definitely don't like the whole idea to use browser cookies (it suppose to be a kind cookie) for authentication: as for dropbox, as for ms skydrive. It's just ugly - period. And about security - I don't think it's a huge improvement.
 

d1k_is

Senior Member
Apr 28, 2009
215
7
0
Brisbane
dkdevelopment.net
It sound like you have no idea how the browsers works... "Browse", "navigate" - it's good terms for users, not for developers. From a technical point of view, browser makes an HTTP or HTTPS request to the host and receive a response. So, what you (and dropbox dev and marketing team) called "token" is a text/binary data, part of the response.

So, what is preventing you to make a direct call to dropbox web service using WebRequest?

P.S. I definitely don't like the whole idea to use browser cookies (it suppose to be a kind cookie) for authentication: as for dropbox, as for ms skydrive. It's just ugly - period. And about security - I don't think it's a huge improvement.
Sorry I was only trying to help.
The tokens are string values and you use a GET via HTTPS sending them as page parameters.
You dont use browser cookies as the dropbox API keeps track of the token you are authenticating against.
 

sensboston

Recognized Developer
Nov 18, 2009
2,142
797
193
Boston, MA
Just tried your WP7 example app from DropNet. Actually it demonstrates a little bit more than nothing :( Could you make a real example, with folders browsing and file operations, please?

P.S. You should use mobile version of dropbox - it feets WP7 screen much better than regular desktop.