We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Blue_Maniac
10 years agoExplorer | Level 3
Newbie Try to Make Some VB app
Hey Guys, Im new here, i need help. i trying to make vb app using dropbox as cloud storage, for team work. I already read the dropbox blog but it confuse me. i cant read the flow or what variable...
- 10 years agoThe /redirect_receiver page you're using is just a blank page on dropbox.com for receiving the redirect. You'll want to send the user elsewhere or just close the browser after that, depending on what you want your app to do.
Greg-DB
Dropbox Community Moderator
10 years agoAs a first step, I recommend running the SimpleBlogDemo sample app and looking through how that works. For example, HomeController.cs shows how to use these methods to set up and process the OAuth app authorization flow.
- Blue_Maniac10 years agoExplorer | Level 3Thanks fo the advice, but after i tried it. i still dont know where to start, i know i need to capture user id and pass to log in to dropbox, second i need to capture the acces token. but i dont understand the flow from example you give. please give me more simple explanation, because im very very new to make vb app with connection to dropbox
- Greg-DB10 years ago
Dropbox Community Moderator
Did you get the sample running and try it out? Where did you get stuck exactly?
Also, we have an OAuth guide here that should serve as a good primer for how the flow works:
https://www.dropbox.com/developers/reference/oauthguide- Blue_Maniac10 years agoExplorer | Level 3
hey i try your example, but it stuck when redirected to https://www.dropbox.com/1/oauth2/redirect_receiver white page and i cant catch the token acces and here i'm. but thanks by the way now i star to understand it
Imports System.Web Imports System.Net Imports System.Text Imports System.Windows.Forms Imports Dropbox Imports Dropbox.Api Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'Be sure to replace this with your app key from dropbox.com/developers/apps. Dim clientID = "oxug9jwop2ktf38" ' The redirect URI you use doesn't really matter, so feel free to use something else, ' but this is one we've set up specifically for client-side apps to use. Dim redirectUri = New Uri("https://www.dropbox.com/1/oauth2/redirect_receiver") Dim uri = String.Format("https://www.dropbox.com/1/oauth2/authorize?response_type=token&redirect_uri={0}&client_id={1}", redirectUri, clientID) WebBrowser1.Navigate(uri) End Sub ' This method gets called when the WebBrowser control loads a new page. Private Sub webBrowser1_Navigated(sender As Object, e As WebBrowser) ' Make sure that this is our redirect page. If (e.Url.AbsoluteUri.StartsWith("https://www.dropbox.com/1/oauth2/redirect_receiver")) Then End If ' Parse out the access token from the URL fragment. Dim accessToken = HttpUtility.ParseQueryString(e.Url.Fragment.Substring(1))("acces_token") ' TODO: Save the access token somewhere so the user doesn't need to log in the next time! ' Make a call to /account/info to verify that the access token is working. Dim client = New WebClient() client.Headers("Authorization") = "Bearer " + accessToken Dim accountInfo = client.DownloadString("https://www.dropbox.com/1/account/info") MessageBox.Show("Account info: " + accountInfo) End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Me.alamat.Text = Me.WebBrowser1.Url.ToString End Sub End Class
About 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!