Jump to content

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

Link to comment
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  

Link to comment
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

Link to comment
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

Link to comment
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
Link to comment
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
 Share

  • Recently Browsing   0 members

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