Skip to main content
Question

Box Shared Link

  • May 22, 2025
  • 4 replies
  • 28 views

Forum|alt.badge.img

When I click on an account, we I see that we have Box embedded in the Account layout. This window displays folders for an account. When I click the "Share this folder" rectangle, another little box pops up. In this new little popup box, I choose, "Get Shared Link: Download Only." What happens next is I get a Shared Link that I can send to anyone so that they can see the files for a particular account...anyone with this link can see the files. 

 

My question is, using Apex, how can I grab this Shared Link and store it in an account field?

 

I've seen some of the other answers on this site that are related to this field, but none of them have worked for me.

 

Thanks 🙂

4 replies

Forum|alt.badge.img

 The Box Salesforce (Apex) SDK provides a BoxFolder#getSharedLink() method that can help you get the shared link for a Box folder.


Forum|alt.badge.img

Ok, there are a ton of classes. When I try to save one class, that class depends on another class. When I try to save the next class, that depends on another class, too, etc. So, do I need to save all classes?


Forum|alt.badge.img

Did anybody actually get t his to work? Just handing someone a link doesn't really help anyone.


Forum|alt.badge.img

For anyone who still needs help, I just managed to create/update the shared link and return it. If you use 'GET' instead of 'PUT' in my solution you should be able to repurpose it for this issue.

 

https://community.box.com/t5/Platform-and-Development-Forum/Box-Shared-Link-through-Salesforce-Apex-Class/m-p/50822/highlight/false#M3983