Jump to content
Sign in to follow this  
Skysnake

Is there a Dropbox API UDF available?

Recommended Posts

Hi All

Is there a Dropbox API UDF available?

The idea is simply to link the Dropbox to some software, whenever the user hits the "save" button, the content gets pushed through to a shared Dropbox.  Like a file sharing system.

I found links from 2011 and 2014.  They just seemed to have died.  Other option is of course to setup the Dropbox manually and simply save the folder path into an INI file, then Windows copies the file to the local \Dropbox\myFolder and Dropbox takes care of the rest.  Very low tech.

Thx

Edited by Skysnake

Skysnake

Why is the snake in the sky?

Share this post


Link to post
Share on other sites

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

Hi @water, yup, it is linked to one of the old threads in the Forum.  It is basic but seems to work.   I will be playing with that.  Downloaded it last night, when I have more time I will see what I can manage.

Thank you for your interest.

Edited by Skysnake

Skysnake

Why is the snake in the sky?

Share this post


Link to post
Share on other sites

Okay, so the following apply, in order:

  1. Must register with Dropbox
  2. When Logged into Dropbox, follow this link Dropbox Register App
  3. Choose options
  4. Dropbox will supply: App key, App secret and Generated access token
  5. I used Grimerly's  UDF to then get back the URL to (a) connect app to dropbox and (b) get authorization token

I guess that with authorization token I can now start up/downloading files.  Will check in again...

Dropbox documentation supports a variety of languages

  • .NET (may work with ADO UDF, I do not know)
  • HTTP 
  • Python etc

:)

 

Note

I had to comment the lines

; Script Line 133-134 for me 
   ;local $size = stringlen($url)
 ;   $obj.SetResponseHeaders("content-length", $size)

to get it to work. Seems to make no difference.

Edited by Skysnake
Comment about UDF

Skysnake

Why is the snake in the sky?

Share this post


Link to post
Share on other sites

Using the examples from the Dropbox site and the UDF above, I go this far:

$sUrl: https://content.dropboxapi.com/2/files/upload \ --header "Authorization: Bearer Rpvj8_mypersonaltoken-BdSlcbeyl26_ECUmoIOLb7ObDSimJ0_tQb-PI5ra" \ --header "Dropbox-API-Arg: {\"path\": \"C:\Users\user\Desktop\Dropbox authenticator/tokens.txt\",\"mode\": \"add\",\"autorename\": true,\"mute\": false}" \ --header "Content-Type: application/octet-stream" \ --data-binary @local_file.txt

13/07 14:31:39 --> File or folder not found at the specified path.

:(

Info: Dropbox documentation

Simplified it to:

$sUrl = ('https://content.dropboxapi.com/2/files_put/auto/ "Authorization: Bearer Rpvj8_mypivatetoken-BdSlcbeyl26_ECUmoIOLb7ObDSimJ0_tQb-PI5ra" \""C:\Users\user\Desktop\Dropbox authenticator/tokens.txt"\"')

Same 404 error.  Something in the <path> syntax...

Edited by Skysnake

Skysnake

Why is the snake in the sky?

Share this post


Link to post
Share on other sites

I see how a Dropbox UDF can be useful and convenient!, I posted  about ,the other day ..
I had an idea to monitor a shared folder in dropbox, and simply do stuff from there to exchange data with a client program
I tried looking into it, but never played with HTTP requests or the dropbox API. 

So I too, was hoping that someone would share a guide or UDF that demonstrates things in "working" condition
anyways,  Good luck with this little project.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By pat4005
      A tiny UDF that can shoot magic packets at your computers to wake them the heck up. All credits to Olish.
      The only parameter it needs to be specified – is your machine's MAC-address (ip address (the second parameter), at which you will be sending magic packet is generating automatically from @IPAddress1 macro)
      Example:
      _WoL_WakeDevice('001CC0CAED7A') ; the second parameter (if necessery) must be a broadcast address of your local network segment (i.e. 192.168.0.255 for a network 192.168.0.0)  
      _WakeOnLan.au3
    • By MrCreatoR
      This UDF allows to create formatted label using pseudo element RichLabel (RichEdit actually). Formating is set by using special modificator similar to <font> tag in Html.
      Notes: This UDF is a transformation-continuation of related UDF


      Example:
      Download:
      GUIRichLabel_1.2.zip
      Small syntax related fix: GUIRichLabel_1.1.zip
      GUIRichLabel_1.1.zip
       
      History version:
    • By Stormgrade
      Hello,
      I'm searching the UDF GDIpProgress.au3 from ProgAndy
      None of the links in topic
       works
      Can't someone upload it please ?
    • By ozymandius257
      This is probably a very simple question (I hope!)
      I'm looking to use a UDF to access a SQL database, and have found ADO.au3, but I can't seem to work out how to use it.
      I've copied the files ado.au3 and ado_constants.au3 into the folder C:\Program Files (x86)\AutoIt3\Include, then opened SciTe and started a new project.
      But when I type #include<AD - I don't get offered ADO.au3.
      (I know I should be using the folder C:\Program Files (x86)\AutoIt3\UserInclude, but when it didn't work from there, I tried the above).
      What am I doing wrong?
       
    • By BetaLeaf
      What is Rollbar?
      Rollbar provides real-time error alerting & debugging tools for developers. Learn more about it at https://rollbar.com/product/
      Demo: https://rollbar.com/demo/demo/
      Screenshot:
      Instructions: (RollbarTest.au3)
      ; Include RollbarSDK #include "RollbarSDK.au3" ;Turns on ConsoleWrite debugging override. ;Global $Rollbar_Debug=False ; Initialize RollbarSDK with the project's API key. ; Parameters ....: $__Rollbar_sToken - [Required] Go to https://rollbar.com/<User>/<ProjectName>/settings/access_tokens/ for your project. Use the token for post_server_item. _Rollbar_Init("eaa8464a4082eeabd9454465b8f0c0af") ; Write code that causes an error you want to catch, then call ; _Rollbar_Send ; Parameters ....: $__Rollbar_sErrorLevel - [Required] Must be one of the following values: Debug, Info, Warning, Error, Critical. ; $__Rollbar_sMessage - [Required] The message to be sent. This should contain any useful debugging info that will help you debug. ; $__Rollbar_sMessageSummary - [Optional] A string that will be used as the title of the Item occurrences will be grouped into. Max length 255 characters. If omitted, Rollbar will determine this on the backend. _Rollbar_Send("Debug", "This is an debug message. If you received this, you were successful!", "Debug Message") _Rollbar_Send("Info", "This is a test message. If you received this, you were successful!", "Info Message") _Rollbar_Send("Warning", "This is an warning message. If you received this, you were successful!", "Warning Message") _Rollbar_Send("Error", "This is an error message. If you received this, you were successful!", "Error Message") _Rollbar_Send("Critical", "This is an critical message. If you received this, you were successful!", "Critical Message") _Rollbar_Send("Info", "This is a test message. If you received this, you were successful!") ;No Message ; Rollbar_Send's helper functions ; Parameters ....: $__Rollbar_sMessage - [Required] The message to be sent. This should contain any useful debugging info that will help you debug. ; $__Rollbar_sMessageSummary - [Optional] A string that will be used as the title of the Item occurrences will be grouped into. Max length 255 characters. If omitted, Rollbar will determine this on the backend. _Rollbar_SendDebug("This is an debug message. If you received this, you were successful!", "Debug Message") _Rollbar_SendInfo("This is a test message. If you received this, you were successful!", "Info Message") _Rollbar_SendWarning("This is an warning message. If you received this, you were successful!", "Warning Message") _Rollbar_SendError("This is an error message. If you received this, you were successful!", "Error Message") _Rollbar_SendCritical("This is an critical message. If you received this, you were successful!", "Critical Message") ; Usable Example Local $sImportantFile = "C:\NOTAREALFILE_1234554321.txt" Switch FileExists($sImportantFile) Case True MsgBox(0, "Example Script", "An important file was found. Continuing...") Case Else _Rollbar_SendCritical('An important file was missing. Halting... File: "' & $sImportantFile & '"', 'Important file "' & $sImportantFile & '" is missing.') EndSwitch Notes: Please comment your feedback, advice, & suggestions below. While this is only a proof of concept, I will expand its feature set for everyone to use. 
      Right now, it is fully functional but not tested in production.
       
       
      Changelog:
      RollbarSDK.au3
      RollbarTest.au3
      v0.2
       
      v0.1.1
       
×
×
  • Create New...