Skip to main content
Question

"This user is not allowed to use direct links" message while using download link (Java SDK)

  • May 21, 2025
  • 2 replies
  • 44 views

Forum|alt.badge.img

Hello,

I'm getting "This user is not allowed to use direct links" message page when I'm trying to download a box file using a download link generated by the following java code [ Box Java SDK ]:

public static BoxSharedLink createSharedLink(BoxFile boxFile) {
        BoxSharedLink.Permissions permissions = new BoxSharedLink.Permissions();
        permissions.setCanDownload(true);
        permissions.setCanPreview(true);
        
        Date unshareAt = null;
        
        BoxSharedLink sharedLink = boxFile.createSharedLink(BoxSharedLink.Access.OPEN, unshareAt, permissions);
        logger.info("Download link: " + sharedLink.getDownloadURL());
        return sharedLink;
}

What this message means?

Is this approach correct to get box file download link using the Box Java SDK?

 

Thank you in advance for your insight and help.

Arpit Bora

2 replies

Forum|alt.badge.img

Forum|alt.badge.img

Thanks for the reply

I'm a free user, I referred the link Direct-Linking-To-A-File.

It states that only paid account user will able to use the direct link.

Is there any implementation (Java SDK) for a free user to get the download link which is used for download file directly?