function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rkris320rkris320 

Salesforce Apex to Box integration

Hi:
Using Apex, I need to be able to login to a particular folder in Box and grab the file name and update the Salesforce record. I am looking for examples of Apex (OAuth2) to connect to Box.  Can you please help or point to any documentation?
Thank you.
VinayVinay (Salesforce Developers) 
Hi Raju,

To use Box as an external data source, first create an authentication provider for it in Salesforce.

Review below links that can help you.

https://help.salesforce.com/articleView?id=admin_files_connect_box_auth.htm&type=5
https://developer.box.com/guides/authentication/oauth2/

Thanks,
Vinay Kumar
rkris320rkris320
Thank you, I looked into that. I was looking for an example using apex to connect to Box.  My requirement is simple.  The apex callout will connect to Box to a particular folder, grab the files one by one, create a shared link and update saelsforce with those shared links.  Thanks again for helping. 

 
VinayVinay (Salesforce Developers) 
Try a salesforce-box using BOX SDK API.  Found below references that can help you.

https://salesforce.stackexchange.com/questions/10287/does-anyone-know-how-to-upload-a-file-from-within-salesforce-up-to-an-existing-b
https://www.sfdcstuff.com/2015/06/box-and-salesforce-integration.html
https://developer.salesforce.com/forums/?id=9060G000000XbQRQA0
https://github.com/box/box-salesforce-sdk

Thanks,
rkris320rkris320
Thank you, all great stuff!