Message Boards Message Boards


Dropbox API version change and ServiceConnect

Posted 1 year ago
8 Replies
7 Total Likes

Dropbox has updated their access API causing the


to now return an error message:

<|"Error" -> "v1_retired"|>

I deleted the cached connection info stored in ~/Library/Mathematica/Paclets associated with Dropbox and same problem.

Is there a workaround?

8 Replies

Hi Philip,

We have worked on updating our connection to Dropbox following their API update. We'll be releasing an update very soon for our users.

Let me get back to you ASAP to keep you updated.


Thanks for the quick reply. It's amazing how rapidly this functionality became integral to a lot of notebooks.

Hey Philip,

Our update have gone through QA and will soon be released (hopefully today). I'll keep you updated.

Posted 1 year ago

When is the ServiceConnect framework gonna be documented (with, of course, a disclaimer on the doc pages that everything is subject to breaking changes at any time)?

I took it apart to see how it works so I could use it for my own stuff and it's turned out to be super useful to be able to make my own service connections. I'm sure I missed thing, though and I think you'd have a happy user-base if you provided them with a tutorial on it at the minimum.

We are actually working on a better framework that will allow users to create their own ServiceConnections easily so you won't have to dissect the code to create your own connections. That framework will be documented when it's released.

Posted 1 year ago

You can always edit the paclet to get it to work again.

Open this file:

     } &@
   "Location"] // SystemOpen

And patch the "URL" parameters in all of the DownValues of dropboxdata

e.g. this:

dropboxdata["RawFileRestore"] = {
        "URL"          -> (ToString@StringForm["`1`", formatrootpath[##]]&),
        "PathParameters"    -> {"Root","Path"},
        "Parameters"       -> {"rev","locale"},
        "RequiredParameters"-> {"Root","Path","rev"}, 
        "HTTPSMethod"     -> "POST",
        "ResultsFunction"   -> dropboximportjson

would turn into this (or something like it):

dropboxdata["RawFileRestore"] = {
        "URL"          -> (ToString@StringForm["`1`", formatrootpath[##]]&),
        "PathParameters"    -> {"Root","Path"},
        "Parameters"       -> {"rev","locale"},
        "RequiredParameters"-> {"Root","Path","rev"}, 
        "HTTPSMethod"     -> "POST",
        "ResultsFunction"   -> dropboximportjson

Is it annoying? Sure. But it'll work. And if you like the ServiceConnect framework, it's always nice to know how to customize it for your own stuff.

A new Dropbox paclet has been pushed live which will resolve this issue. Basically the issue was due to Dropbox has stopped version 1 api support. More information at The new paclet supports v2 apis which are new and faster.

In[3]:= PacletUpdate["ServiceConnection_Dropbox"]

Out[3]= PacletManager`Paclet[
"Name" -> "ServiceConnection_Dropbox", "Version" -> "11.2.0", 
 "MathematicaVersion" -> "11.0+", 
 "Extensions" -> {{
   "Kernel", "Root" -> "Kernel", 
    "Context" -> {"Dropbox`", " DropboxLoad`"}}, {
   "Documentation", "MainPage" -> "ReferencePages/Symbols/Dropbox", 
    "Language" -> "English"}}, 
 "Location" -> "/Users/damanjits/Library/Mathematica/Paclets/\

In[4]:= Quit

In[1]:= RebuildPacletData[]

In[2]:= dropbox = ServiceConnect["Dropbox"]

Out[2]= ServiceObject["Dropbox", 
 "ID" -> "connection-cce5eb7df530d3b6cb6d12ac438d97c8"]

In[4]:= dropbox["UserData"]

Out[4]= <|"ReferralLink" -> "", 
 "Disabled" -> False, "IsPaired" -> False, 
 "Email" -> "", 
 "AccountID" -> "dbid:AAALg-wp1VzCpe-BncerqAd442vQb9PkfHo", 
 "Name" -> {"FamiliarName" -> "Test", "GivenName" -> "Test", 
   "AbbreviatedName" -> "TW", "Surname" -> "Wolfram", 
   "DisplayName" -> "Test Wolfram"}, "EmailVerified" -> True, 
 "Country" -> "US", "AccountType" -> {"Tag" -> "basic"}, 
 "Locale" -> "en"|>

In[5]:= dropbox["FileNames", "Path" -> "/WolframGraphics"]

Out[5]= Dataset[ <> ]

In[7]:= dropbox[
  "DirectoryTreePlot", {"Path" -> "/", "Recursive" -> True}] // Head

Out[7]= Graphics

Notice the change in parameters of DirectoryTreePlot, "Root" parameter is no longer used in all the requests. Instead File/Directory path should start with '/'. These minor documentation tweaks will be available soon in online documentation.

Thank you Wolfram Team for the quick-turn around.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract