• Document Up to Date
  • Updated On 4.0.0

Box Profiles Configuration

The Box Profiles configuration file allows you to configure 0 or more Box profiles with the information required by Box services. To modify the Box Profiles configuration, click on projectTools from the bottom of the Sidebar, then click on Configuration and select Box Profiles from the list.

Configurations - Open Box Profiles Configuration

Sample

Here’s a sample Box Profiles Configuration file (click on the triangle on the left to expand/collapse):

Sample "box.xml"
CRAFTER_HOME/data/repos/sites/SITENAME/sandbox/config/studio/box/box.xml
 1<?xml version="1.0" encoding="UTF-8"?>
 2<!--
 3  ~ Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved.
 4  ~
 5  ~ This program is free software: you can redistribute it and/or modify
 6  ~ it under the terms of the GNU General Public License version 3 as published by
 7  ~ the Free Software Foundation.
 8  ~
 9  ~ This program is distributed in the hope that it will be useful,
10  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
11  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  ~ GNU General Public License for more details.
13  ~
14  ~ You should have received a copy of the GNU General Public License
15  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  -->
17
18<!--
19    Box profiles configuration file. This files configures 0 or more
20    profiles with the information required by the Box API.
21
22    For every profile you need to specify:
23    <profile>
24        <id/>
25        <clientId/>
26        <clientSecret/>
27        <enterpriseId/>
28        <publicKeyId/>
29        <privateKeyPath/>
30        <privateKeyPassword/>
31        <uploadFolder/>
32    </profile>
33
34    id:	a unique id for this profile, this will be referenced in the
35        control defined in the content type
36    clientId: Box client id
37    clientSecret: Box client secret
38    enterpriseId: Box enterprise id
39    publicKeyId: Box public key id
40    privateKeyPath: Full path for the private key file
41    privateKeyPassword: Password used to decrypt the private key
42    uploadFolder: Name of the folder where files will be uploaded
43
44-->
45<box>
46    <box>
47        <profile>
48            <id>box-default</id>
49            <clientId>...</clientId>
50            <clientSecret>...</clientSecret>
51            <enterpriseId>...</enterpriseId>
52            <publicKeyId>...</publicKeyId>
53            <privateKeyPath>...</privateKeyPath>
54            <privateKeyPassword>...</privateKeyPassword>
55            <uploadFolder>videos</uploadFolder>
56        </profile>
57    </box>
58</box>


Box Configuration

To obtain the clientId, clientSecret, enterpriseId, publicKeyId, privateKey and privateKeyPassword you need to use a Box Developer Account to create a new App and configure it to use OAuth 2.0 with JWT.

For more details you can follow the official documentation.

Note

If you are using a JRE older than 1.8.0_151 you need to install the JCE Unlimited Strength Jurisdiction Policy Files. For newer versions you only need to enable the unlimited strength setting.