cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generating a Download Link

Generating a Download Link

jonro
New member | Level 2

A few years ago I used the HTTP API to generate email links to folders. It suddenly stopped working and I discovered that there is a new API and the old one has been deprecated. I had not heard about the change until now. At any rate simple request I have been using looks like:

 

"https://api.dropbox.com/1/shares/dropbox/myFolder" &  "?access_token=<REDACTED>"

 

Instead of returning a link, I get an error message of "

{"error": {"path": "The root path (\"/\") is not allowed."}}"

 

Would someone please tell me how to change the request to work with the new API? I'm under a time crunch and I'm not sure where to start. Thanks in advance.

1 Reply 1

Greg-DB
Dropbox Staff

@jonro API v1 was deprecated last year, and is no longer supported and is being retired very soon. I'm sorry to hear this caught you by surprise. We sent out emails notifying developers, but unfortunately it sounds like those didn't make it to you. 

 

For reference though, /1/shares should still be working for now, and shouldn't have changed recently. I just tried a request like what you posted, and it worked for me. Based on the error message, it looks like your actual code isn't passing in the folder/file name (in your example, "myFolder"). If you want to get that working again for now, you should check why that value isn't getting filled (or is itself empty).

 

In any case, you will need migrate to API v2. The API v2 equivalent of /1/shares is /2/sharing/create_shared_link_with_settings to create a new shared link, or /2/sharing/list_shared_links (with direct_only=true) to retrieve an existing shared link. There are curl examples for each of those that show how to make the HTTP request.

 

 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?