cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it 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: 

A couple of questions about get_temporary_link

A couple of questions about get_temporary_link

elysdir
Explorer | Level 4
Go to solution

Hi, folks—I’m using a team Dropbox account that has 1TB of daily bandwidth, but I’m a little unclear on how a couple of things work. Here are my questions:

 

1. Say I use /get_temporary_link to get a link to a 25GB file in my Dropbox account, and say 100 people try to use that link to download the file. If all of those downloads succeeded, that would be 2.5TB of data being downloaded. So does the bandwidth limit go into effect after the first 1TB of downloads, so that only the first 40 or so people succeed?

1a. If we go over the bandwidth limit, does the next call to /get_temporary_link result in an error message?

1b. Is the bandwidth limit per 24-hour period, or per calendar day? That is, does it look at the previous 24 hours at any given moment, or does it reset at midnight every night?

2. The documentation (https://www.dropbox.com/developers/documentation/http/documentation#files-get_temporary_link) says that the link generated by /get_temporary_link lasts for four hours. If someone uses that temporary link to download but they’re on a very slow connection, such that it will take them six hours to download my file, does their download succeed? Or does their download stop partway through after four hours, when the link expires?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Regarding the timing, I was referring to when the requests to the link returned by /2/files/get_temporary_link are initiated. That is, if all 100 initiate their requests to the link before the account's links are banned, I would expect all 100 to complete. I would expect any requests initiated after the account's links are banned to fail. So, if everyone downloaded it one at a time, then yes I would expect that to start failing after 40 people. Again though, I should caveat that this implementation detail is not documented or guaranteed.

 

Likewise, once the account's links are disabled, any further API calls to /2/files/get_temporary_link call should fail.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution

It sounds like you're referring to the limits covered in this help center article.

 

1. It looks like this would depend on the timing and how this works in practice, see below.

1a. Yes, if the account's links are currently disabled, the /2/files/get_temporary_link call would fail with a 'not_allowed' error.

1b. I don't see any particular guarantee on exactly how the code works for this, so I wouldn't recommend relying on a particular behavior for the exact timing.

 

2. I believe the checks (both link expiration and bandwidth limit) occur at the beginning of the process, and so I would expect an in-progress download to continue, but as above I don't have a documented guarantee to offer for that.

elysdir
Explorer | Level 4
Go to solution

Thank you! Just to be sure I understand your answer to my question 1, here’s a followup more-specific version of that question:

Say I use /get_temporary_link to get a link to a 25GB file in my Dropbox account, and say 100 people try to use that link *within the next hour* to download the file. (So the timing issues don’t apply—this is all within a single day’s bandwidth limit.) And here again, say my bandwidth limit is 1TB.

 

Am I right in thinking that the first 40 or so people would succeed, and then after we reached the bandwidth limit, the account’s links would be disabled, and the /2/files/get_temporary_link call would fail?

Greg-DB
Dropbox Staff
Go to solution

Regarding the timing, I was referring to when the requests to the link returned by /2/files/get_temporary_link are initiated. That is, if all 100 initiate their requests to the link before the account's links are banned, I would expect all 100 to complete. I would expect any requests initiated after the account's links are banned to fail. So, if everyone downloaded it one at a time, then yes I would expect that to start failing after 40 people. Again though, I should caveat that this implementation detail is not documented or guaranteed.

 

Likewise, once the account's links are disabled, any further API calls to /2/files/get_temporary_link call should fail.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    elysdir Explorer | Level 4
What do Dropbox user levels mean?