Forum Discussion

JMagnat's avatar
JMagnat
Explorer | Level 3
9 years ago

Migration V1 to V2

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??? 

15 Replies

Replies have been turned off for this discussion

About Dropbox API Support & Feedback

Node avatar for 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!