1)How to generate Box API Key
Go to https://app.box.com/developers/console and click on create new app
2) Then select Enterprise Integration for the type of app we are building and click on Next
3) Select Authentication method as OAuth 2.0 with JWT (Server Authentication) and click on Next
4) Then type in unique name for your app and then click on Create App for creating a new BOX app.
5) App has been created
6) Generate a Public/Private Keypair to get the downloadable file.
7) We require further 2 step verification for authentication.
To Authenticate app
2) Click on settings icon in the top right corner of the window and then click on Business setting -> https://app.box.com/master/settings
3) Then click on apps -> Custom Applications -> authorize new app
4) Enter Client ID as API key that can be found under configuration (added screenshot below APP Auth image)
Now Set your domain in the configuration for which you have to use the key.
for example : http://yoursitename.com
2) Configure New Box plugin
Plugins -> filter type as tjdocument -> edit Techjoomla-Document Viewer Box API V2
a)JSON -> just paste downloaded code and then click on Individually Button
b)Set individual field -(Optional)
If you need to change any setting in future for example Client ID or client secret they you can click on Individually button and reset it as per you need.
3)Migrate old Box document to New
If you were using the ‘Old Box API Plugin’ initially, you will be able to use this to migrate documents from the Old Box View API to the new version.
Before you can use the migration tool, you need to save the Plugin configuration for this plugin correctly. Note that the Migrator tool needs that your documents need to stored locally on the same server as the extension installation.
If you have used Amazon S3, you need to first move it to the local server. Click here to know more about storage. While we try to migrate all files, some larger files might fail. You can find the Log of the migration here: administrator/logs/boxapi.migration.php.
For any files that fail, it's recommended you should manually upload your documents on Box app and update media table entry for that media id. There are two columns that needs changes -
a) sub_format - change from boxapi.upload to boxapi2.upload.
b) params - This is a json value, you need to change document_id value to new one that you get after upload document to the new box.
Here is how you can do Manual upload
a) Go to Box Admin Console
b) Click on folder icon (content manager)
c) On the left side panel, right click on created App and then click on Log in to user's account option.
d) Upload your file here and when you click on that file you can get the document id from URL. So if URL is https://app.box.com/file/1234567890 , then document id is 1234567890