Jump to content

Recommended Posts

Posted

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

Posted

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 

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
Posted

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  

Posted

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

Posted

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

Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...