Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi,
in V1 I simply use:
Public Function write(myFile As String) As MetaData Dim Client As DropNetClient = New DropNetClient(Konstanten.DropboxAppKey, Konstanten.DropboxAppSecret) Client.UseSandbox = True Client.GetToken() Process.Start(Client.BuildAuthorizeUrl()) MessageBox.Show("Wait") Try Dim accessToken = Client.GetAccessToken() Dim myFilestream As FileStream = New FileStream(myFile, FileMode.Open, FileAccess.Read) Dim myReturn As MetaData = Client.UploadFile("/", System.IO.Path.GetFileName(myFile), myFilestream) myFilestream.Close() Return myReturn Catch ex As Exception Return Nothing End Try End Function
How can I get the token in V2 without entering the code by the user???
For using API v2 from .NET, we recommend using the official Dropbox .NET SDK:
https://www.dropbox.com/developers/documentation/dotnet
The examples show how to handle authorization, e.g., using DropboxOAuth2Helper in SimpleBlogDemo:
I had a look at all docus but I cant recognize in the example how I can get an accesstoken. I can generate the uri to show the authentification to the user but I cant receive a token.
Can you gibe me a hint?
OK, I understand this. Thanx
Unfortunately my next question... 😉
Which format must the redirected uri be have? I must register this uri in the apps profile at dropbox. How can it be variable if my app runs on many different PCs?
A static redirect URI? What could this be? I think I must use a format like "https:\\aWebSide.com\anything" but this side doesnt exist and dropbox will send the users browser to them.
With ApiV1 the user connect to dropbox and my app get the token to download anything to dropbox. This isnt a web app.
I see this code in an example
var builder = new UriBuilder( Uri.UriSchemeHttps, this.Request.Url.Host); builder.Path = "/Home/Auth"; return builder.ToString();
But this generates no static Uri. How can I register this kind of redirectUri in the my dropbox app profile?
Hi there!
If you need more help you can view your support options (expected response time for a 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!