cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more 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: 

C# API FileRequest Deadline

C# API FileRequest Deadline

illcom94
New member | Level 2

I'm attempting to create a File Request link with a deadline. I am using a business account. When I get the return, it lists the deadline as I sent it, but it doesn't appear to be active when I use the link. Here is some code:

 

var dbTeamClient = new DropboxTeamClient("authcode");
var dbClient = dbTeamClient.AsMember(memberId);
var listFoldersTask = dbClient.Files.ListFolderAsync("path to parent folder");
listFoldersTask.Wait();
var folders = listFoldersTask.Result;
foreach (var folder in folders.Entries)
{
    var requestDeadline = new Dropbox.Api.FileRequests.FileRequestDeadline(new DateTime(2020, 6, 1));
    var requestArgs = new Dropbox.Api.FileRequests.CreateFileRequestArgs(
        folder.Name,
        folder.PathLower,
        requestDeadline
        );
        var fileRequestTask = dbClient.FileRequests.CreateAsync(requestArgs);
        fileRequestTask.Wait();
        Console.WriteLine("{0} {1}", folder.Name, fileRequestTask.Result.Url);
}

The links get created, and they have a deadline date on the fileRequestTask.Result, but it doesn't seem to take effect.

5 Replies 5

Greg-DB
Dropbox Staff

Thanks for the report! I just gave this a try though and it appears to be working properly for me. I also tried making one with this code, slightly modified to make the deadline a few seconds in the future, and the file request properly expired for me.

 

Can you elaborate on what you mean when you say "it doesn't seem to take effect"? For instance, you should be able to see the deadline on the file request by clicking the "..." then "Edit" for the file request on https://www.dropbox.com/requests . What is it showing for you there?

illcom94
New member | Level 2

Hi Greg! Thanks for the reply. It does look the links do expire correctly. It through me for a loop that when you create the links manually, the user gets a message on the upload page that they are limited on time to submit files. However when you follow a link that you create with the API, no such message appears on the upload page.

Greg-DB
Dropbox Staff

I see, thanks! I'll ask the team to see if we can get that fixed up to show there for file requests created via the API as well.

illcom94
New member | Level 2

Thanks, Greg! That would be fantastic!

Greg-DB
Dropbox Staff

This should be fixed now. Please let me know if you're still seeing this issue. Thanks!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    illcom94 New member | Level 2
What do Dropbox user levels mean?