You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

elysdir's avatar
elysdir
Explorer | Level 4
7 months ago

A couple of questions about get_temporary_link

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?

  • 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.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    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's avatar
      elysdir
      Explorer | Level 4

      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's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        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.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,885 PostsLatest Activity: 16 hours ago
326 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!