title: Example of DropBox API PUT using Curl and Oauth 2 to Upload a file to DropBox
body: <p>I am searching everywhere and haven't been able to locate a suitable example and am not well versed enough to be able to sort it out via the docs.  Could someone with more knowledge than I show me how to form the CURL command for OAUTH 2?  And is it that I only need the OAUTH 2 secret key?  I am being shown an App key, app secret and oauth 2.  I am using this in a perl script if it matters.</p>
  
  <p>The closest code I have found is this:</p>
  
  <pre><code> curl --request PUT --header "Content-Length: `ls -la jonathan.txt | awk '{ print $5}'`" --header         
   "Content-Type: multipart/mixed" --data-binary "@jonathan.txt" "https://api-    
   content.dropbox.com/1/files_put/dropbox/jonathan.txt?access_token=ABCDEF"
  </code></pre>
  
  <p>But I don't think that is OAUTH 2?</p>