7

I am new to integrating drop box, but I am not quite sure how to generate a call to get the request token secret.

https://www.dropbox.com/developers/reference/api#request-token

I have to make a call to this url https://api.dropbox.com/1/oauth/request_token what is the best way to do this? with c#?.

Thank you for any help you may provide

PS: I am just not sure which c# libraries to use for this.

jedgard
  • 868
  • 3
  • 23
  • 41

3 Answers3

3

There's a .Net Dropbox library on Codeplex which looks quite good: http://sharpbox.codeplex.com/

Surfbutler
  • 1,529
  • 2
  • 17
  • 38
  • 1
    Sharpbox is not updated yet, they dont have all the functionalities we need like for example the "Share" function – jedgard Jul 10 '12 at 20:24
2

Something like the following should work:

System.Net.WebClient client = new System.Net.WebClient();
string response = client.DownloadString("https://api.dropbox.com/1/oauth/request_token"); // Add necessary query parameters

// Parse the response
System.Collections.Specialized.NameValueCollection collection = System.Web.HttpUtility.ParseQueryString(response);

I included the namespaces to clarify the location of each class, but you should probably just put using directives at the top of your file.

Spectre87
  • 2,374
  • 1
  • 24
  • 37
0

System.Net.WebRequest is the class you want. Specifically, you'll need to call Create() with the URL and then call GetResponse() to read the result.

MNGwinn
  • 2,394
  • 17
  • 18