Jump to content
Sign in to follow this  
Gimerly

How to get oauth_access_token and oauth_access_token_secret for dropbox

Recommended Posts

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

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

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

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

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  

×
×
  • Create New...