Sign in to follow this  
Followers 0
Gimerly

How to get oauth_access_token and oauth_access_token_secret for dropbox

24 posts in this topic

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

Share this post


Link to post
Share on other sites



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 

Share this post


Link to post
Share on other sites

So use POST verb with request. Show your code and I'll tell you what to change.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

#5 ·  Posted (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  

post-85533-0-47704400-1398511490_thumb.p

Edited by Gimerly

Share this post


Link to post
Share on other sites

Remove file input from the form. Why did you add it there?

Or you could use WinHttpSimpleSSLRequest for now.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

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  

Share this post


Link to post
Share on other sites

You do have extra space character before the "https", but really, post your code. Pictures of it lame they are, Luke.

1 person likes this

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Here is the updated code 

post-85533-0-94188900-1398582990_thumb.p

Share this post


Link to post
Share on other sites

Ok then, is English your native language and how old are you?

...just to break the ice bfore continuing.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

No its not. If you guys dont want to help thats cool. I just dont know what the problem is 

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Oh okay thank you. How do I post using autoit tags?

Edited by Gimerly

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

Remove the second line from your form for form-filling function.

Or use WinHttpSimpleSSLRequest correctly.

Edited by trancexx

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Lol sorry forgot about the parameters, I do still however get a return value of 0. 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0