Gimerly Posted April 26, 2014 Share Posted April 26, 2014 hey I'm using dropbox delta API to make things easier to update local files with that of my files with my dropbox account, what I need help with is that I don't know how to get the oauth_access_token and oauth_access_token_secret for dropbox. If any one can help me that would be epic. For those wondering I'm using WinHttp UDF for uploading files Link to comment Share on other sites More sharing options...
trancexx Posted April 26, 2014 Share Posted April 26, 2014 API documentation explaines that. See https://www.dropbox.com/developers/core/docs ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Gimerly Posted April 26, 2014 Author Share Posted April 26, 2014 It says the method is post, So how would I actually retrieve the oauth stuff with WinHttp.au3 or do I need something else cause I tried to get it using WinHttp but it returned nothing Link to comment Share on other sites More sharing options...
trancexx Posted April 26, 2014 Share Posted April 26, 2014 So use POST verb with request. Show your code and I'll tell you what to change. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Gimerly Posted April 26, 2014 Author Share Posted April 26, 2014 (edited) Note that I have only spent about 30 minutes in total (been really busy with work) so its extremely likely Im using the wrong structure Edited April 26, 2014 by Gimerly Link to comment Share on other sites More sharing options...
trancexx Posted April 26, 2014 Share Posted April 26, 2014 Remove file input from the form. Why did you add it there? Or you could use WinHttpSimpleSSLRequest for now. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Gimerly Posted April 27, 2014 Author Share Posted April 27, 2014 Even with the updated code I still have nothing returned. Is there something wrong with the URL im using. Do I have to integrate my app key and secrete into it. p.s Im sorry these may sounds like dumb questions but this is the first time I have tried to do file upload and download and still am unsure of many of the parameters Link to comment Share on other sites More sharing options...
trancexx Posted April 27, 2014 Share Posted April 27, 2014 You do have extra space character before the "https", but really, post your code. Pictures of it lame they are, Luke. Palestinian 1 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Gimerly Posted April 27, 2014 Author Share Posted April 27, 2014 Here is the updated code Link to comment Share on other sites More sharing options...
JohnOne Posted April 27, 2014 Share Posted April 27, 2014 lol AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
trancexx Posted April 27, 2014 Share Posted April 27, 2014 Ok then, is English your native language and how old are you? ...just to break the ice bfore continuing. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Gimerly Posted April 27, 2014 Author Share Posted April 27, 2014 No its not. If you guys dont want to help thats cool. I just dont know what the problem is Link to comment Share on other sites More sharing options...
JohnOne Posted April 27, 2014 Share Posted April 27, 2014 When you post your code in a picture, people have to type the whole thing out if they want to try to help you. Post your code in autoit code tags. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Gimerly Posted April 27, 2014 Author Share Posted April 27, 2014 (edited) Oh okay thank you. How do I post using autoit tags? Edited April 27, 2014 by Gimerly Link to comment Share on other sites More sharing options...
JohnOne Posted April 27, 2014 Share Posted April 27, 2014 Oh okay thank you. How do I post using autoit tags? '?do=embed' frameborder='0' data-embedContent>> AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Gimerly Posted April 28, 2014 Author Share Posted April 28, 2014 func _GetToken () $hOpen = _WinHttpOpen() $sAddress = "https://api.dropbox.com/1/oauth/request_token" Local $sLocalForm = '<form action="' & $sAddress & '" method="post" enctype="multipart/form-data">' & @CRLF & _ ' <id="file" name="ouath" />' & @CRLF & _ '</form>' local $sRead = _WinHttpSimpleSSLRequest($sLocalForm, $hOpen, Default, "file", @ScriptFullPath) _WinHttpCloseHandle($hOpen) ConsoleWrite($sRead & @CRLF) MsgBox(64, "", $sRead) endfunc Thanks for the help JohnOne. My initial thought are that my form is wrong but I don't know. I get a return of 0 when running the script Link to comment Share on other sites More sharing options...
trancexx Posted April 28, 2014 Share Posted April 28, 2014 (edited) Remove the second line from your form for form-filling function. Or use WinHttpSimpleSSLRequest correctly. Edited April 28, 2014 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Gimerly Posted April 28, 2014 Author Share Posted April 28, 2014 Lol sorry forgot about the parameters, I do still however get a return value of 0. Link to comment Share on other sites More sharing options...
trancexx Posted April 29, 2014 Share Posted April 29, 2014 And your code is? We are going in circles. The idea is you post the code and explain what happens, then someone tells you what you did wrong, then you correct it an post the code again together with the result. Then you add more code, etc, etc. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Gimerly Posted April 29, 2014 Author Share Posted April 29, 2014 Sorry, this is my first time on forums. I'm pretty dumb so please bear with me. func _GetToken () local $sType = "post" Local $hOpen = _WinHttpOpen() Local $sAddress = "https://api.dropbox.com/1/oauth/request_token" Local $hConnect = _WinHttpConnect($hOpen, $sAddress) local $sRead = _WinHttpSimpleSSLRequest($hConnect, $sType, @DesktopDir, Default) _WinHttpCloseHandle($hConnect) ConsoleWrite($sRead & @CRLF) MsgBox(64, "", $sRead) endfunc Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now