Jump to content

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?

Link to comment
Share on other sites

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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

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

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

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

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

×
×
  • Create New...