> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Box

> Browse, search, upload, and organize files and folders in Box cloud storage

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: OAuth 2.0.
* **Connection**: A user authorizes the connection in the provider's consent screen.
* **Scopes**: `root_readwrite`.
* **Docs**: [https://developer.box.com/guides/authentication/oauth2/](https://developer.box.com/guides/authentication/oauth2/)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

With a managed OAuth app, Connect works without these variables; set them to use your own OAuth app instead.

| Variable            | Required | Description                                                                                                                                       |
| ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BOX_CLIENT_ID`     | Yes      | Box OAuth Client ID (from your Custom App in the Developer Console) [Docs](https://developer.box.com/guides/authentication/oauth2/oauth2-setup/). |
| `BOX_CLIENT_SECRET` | Yes      | Box OAuth Client Secret [Docs](https://developer.box.com/guides/authentication/oauth2/oauth2-setup/).                                             |

## Setup

1. **Create a Box app**: Sign in at [https://app.box.com/developers/console](https://app.box.com/developers/console) (a free Individual Box account works) and create a Custom App with 'User Authentication (OAuth 2.0)'.
2. **Configure the redirect URI and scopes**: In the app's Configuration tab, add your redirect URI ending in /api/auth/box/callback and enable the 'Read and write all files and folders' application scope.
3. **Copy credentials**: Copy the Client ID and Client Secret from the Configuration tab into BOX\_CLIENT\_ID and BOX\_CLIENT\_SECRET.
4. **Verify access**: Connect your Box account and run the List Folder Items tool against folder 0.

* Authorization codes are only valid for 30 seconds; the client is authenticated with client\_id/client\_secret in the token request body
* Refresh tokens are issued; access tokens are short-lived and refreshed automatically
* Uploads go to upload.box.com as multipart/form-data: the 'attributes' part must come before the 'file' part, and files over 50 MB require Box's chunked upload API (not covered by these tools)

Provider API reference: [https://developer.box.com/reference/](https://developer.box.com/reference/)

## Tools

| Tool                | Access | Description                                                                                                                                                                                            |
| ------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| List Folder Items   | Read   | List files and subfolders inside a Box folder (folder 0 is the root)                                                                                                                                   |
| Get File            | Read   | Get metadata about a Box file                                                                                                                                                                          |
| Get Folder          | Read   | Get metadata about a Box folder                                                                                                                                                                        |
| Search              | Read   | Search for files and folders across the Box account                                                                                                                                                    |
| Create Folder       | Write  | Create a new folder inside a Box parent folder                                                                                                                                                         |
| Upload File         | Write  | Upload a new file (up to 50 MB) into a Box folder; larger files require Box's chunked upload API                                                                                                       |
| Upload File Version | Write  | Upload a new version of an existing Box file (up to 50 MB)                                                                                                                                             |
| List File Comments  | Read   | List comments on a Box file                                                                                                                                                                            |
| Add Comment         | Write  | Add a comment to a Box file                                                                                                                                                                            |
| Download File       | Read   | Download a file's content; Box responds with a 302 redirect to a short-lived dl.boxcloud.com URL that is followed to fetch the binary content (a 202 with Retry-After means the file is not yet ready) |

## Example prompts

* List the files and folders in my Box root folder.
* Search my Box account for a file by name and show its details.
