Box
Box connects with OAuth 2.0 through Truto's Box app or your own.
Install the Box integration
Install Box from Available integrations in each environment you connect accounts from.
Use your own Box OAuth app
Truto connects Box accounts through its own OAuth app, so this step is optional unless you want webhooks (see Receive webhooks) or the Box file picker on your site, which needs your site's origin listed on the Box app. To show your own app on the consent screen instead:
- Create an OAuth app in Box and add
https://api.truto.one/connect/box/callbackas its redirect URL. If you use a redirect URL on your own domain, add that URL instead. - Enter the app's Client ID and Client Secret on the installed Box integration. See Overriding OAuth credentials.
By default, Truto asks Box for these scopes. The Connect UI lists them under Permissions required, and you can change them when you override the OAuth credentials.
manage_enterprise_propertiesmanage_managed_usersmanage_groupsroot_readwritemanage_webhook
Enable the same scopes on your app. If your app allows fewer, change the list under Use your own OAuth settings → Scopes on the installed integration's Configuration tab to match.
Connect a Box account
- In Integrated Accounts, click Connect Account.

- Enter a Tenant ID (your customer's ID; Truto creates the tenant if it is new), or pick one under Existing tenant (optional). Check the Environment and the Region (where Truto places the account; Western North America by default). To open the link straight on Box, pick it under Advanced settings → Integration (optional). Click Get connection link.

- Click the open-in-new-tab button, or click Copy and send the link to your customer so they connect their own Box account. The link works for 7 days, until an account is connected with it.

- Click Get Started if it shows, then select Box.

- Sign in to Box and allow access to Truto.
- Close the tab when you see Connection successful. The new account appears under Integrated Accounts. Click its Account ID to see its details and make API calls.
Receive webhooks
Box can send file and folder changes to Truto, which passes them on as unified record:* events on file-storage/drive-items.
Box signs each webhook with the signature keys of the Box app the webhook belongs to, so the accounts must connect through your own Box app.
- Install the File Storage Unified API in the environment. Truto turns Box events into
record:*events only through it; without it, events are dropped. - Subscribe a Truto webhook to
record:created,record:updatedandrecord:deleted, orall. See Creating a webhook. - In the Box Developer Console, open your app, go to the Webhooks tab, click Manage signature keys and generate a primary key.
- Save the primary key as a
webhook_secretvariable on the integrated account: Integrated Accounts → the account → Details → Variables → Edit variables (Add variables when it has none). Truto checks every event'sbox-signature-primaryheader against it and rejects events that don't match. - Create the webhook through the Proxy API resource
webhooks(POST /2.0/webhooksin Box) for the file or folder to watch, with the addresshttps://api.truto.one/integrated-account-webhook/<integrated_account_id>and the triggers below.
| Box trigger | Truto event |
|---|---|
FILE.UPLOADED, FILE.COPIED, FOLDER.CREATED, FOLDER.COPIED |
record:created |
FILE.RESTORED, FILE.MOVED, FILE.RENAMED, FOLDER.RENAMED, FOLDER.RESTORED, FOLDER.MOVED |
record:updated |
FILE.TRASHED, FILE.DELETED, FOLDER.TRASHED, FOLDER.DELETED |
record:deleted |