"This user is not allowed to use direct links" message while using download link (Java SDK)
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
-
I ran your code and tested it and it works fine.
https://github.com/kendomen/BoxJavaJWTExamples/blob/master/src/com/nike/box/CreateSharedLink.java
I'm wondering, are you a free user or paid user?
https://community.box.com/t5/Collaboration-and-Sharing/Direct-Linking-To-A-File/ta-p/148
-
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?
Please sign in to leave a comment.
Comments
2 comments