Scenario: I want to create a vb.net application which will automatically upload a backup file to my clients' dropbox account. So each of my client will be able to use my app and upload the backup file o their own dropbox account.
Steps I already did:
I have created an application on Dropbox in App Console area.
I have edited the permissions which my app will need.
I have generated my access token from my app Panel (lest name it dx)
Using visual studio (and vb.net language) I created the code below(Imports Dropbox.Api, System.IO are needed)
Public Class Form1
Public dbx = New DropboxClient("myAccessToken")
'~~~~~~~~~~~~~~~Upload File Button
Private Sub btnUploadFile_Click(sender As Object, e As EventArgs) Handles btnUploadFile.Click
Dim task = System.Threading.Tasks.Task.Run(CType(AddressOf UploadFile, Func(Of Task)))
task.Wait()
End Sub
'~~~~~~~~Code to upload the file on dropbox account
Public Async Function UploadFile() As Task
Await dbx.Files.UploadAsync(DropboxPath & FileName, body:=(New FileStream(LocalPath & FileName, FileMode.Open, FileAccess.Read)))
End Function
End Class
Until here everything work great! (and i can successfully upload a file to my dropbox)
But now, I am confused about how my app users will work with my application and for the further steps.
I know that I have to "Apply my App for Production", but after what?
I have read many articles but still confused about the way.
Is there any simple way to help me?
While you can use a generated access token to test against your own Dropbox account, in order to have arbitrary end-users connect their accounts to your app, you'll need to implement the OAuth app authorization flow. You can find more information in the OAuth Guide and authorization documentation.
For the official Dropbox API v2 .NET SDK, you can find examples of using the OAuth flow in the OauthBasic example (non-PKCE, meant for server-side apps) as well as in the OAuthPKCE example (PKCE, meant for client-side apps).