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

# Box

> Integrate your application with the Box API

## 🚀 Quickstart

Connect to Box with Nango and see data flow in 2 minutes.

<Steps>
  <Step title="Create the integration">
    In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Box*. Nango doesn't provide a test OAuth app for Box yet. You'll need to set up your own by following these [instructions](#🧑%E2%80%8D💻-oauth-app-setup). After that, make sure to add the OAuth client ID, secret, and scopes in the integration settings in Nango.
  </Step>

  <Step title="Authorize Box">
    Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then log in to Box. Later, you'll let your users do the same directly from your app.
  </Step>

  <Step title="Call the Box API">
    Let's make your first request to the Box API (fetch the profile of the currently signed-in user). Replace the placeholders below with your [secret key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

    <Tabs>
      <Tab title="cURL">
        ```bash theme={null}
        curl "https://api.nango.dev/proxy/2.0/users/me" \
          -H "Authorization: Bearer <NANGO-SECRET-KEY>" \
          -H "Provider-Config-Key: <INTEGRATION-ID>" \
          -H "Connection-Id: <CONNECTION-ID>"
        ```
      </Tab>

      <Tab title="Node">
        Install Nango's backend SDK with `npm i @nangohq/node`. Then run:

        ```typescript theme={null}
        import { Nango } from '@nangohq/node';

        const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' });

        const res = await nango.get({
            endpoint: '/2.0/users/me',
            providerConfigKey: '<INTEGRATION-ID>',
            connectionId: '<CONNECTION-ID>'
        });

        console.log(res.data);
        ```
      </Tab>
    </Tabs>

    Or fetch credentials with the [Node SDK](/reference/sdks/node#get-a-connection-with-credentials) or [API](/reference/api/connection/get).

    ✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.
  </Step>

  <Step title="Implement Nango in your app">
    Follow our [Auth implementation guide](/guides/primitives/auth) to integrate Nango in your app.

    To obtain your own production credentials, follow the setup guide linked below.
  </Step>
</Steps>

## 📚 Box Integration Guides

Nango maintained guides for common use cases.

* [How to register your own Box OAuth app](/api-integrations/box/how-to-register-your-own-box-api-oauth-app)\
  Register an OAuth app with Box and obtain credentials to connect it to Nango

Official docs: [Box API docs](https://developer.box.com/reference)

## 🧩 Pre-built syncs & actions for Box

Enable them in your dashboard. Extend and customize to fit your needs.

### Collaborations

| Function name          | Description                                                                          | Type                                         | Source code                                                                                                              |
| ---------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `create-collaboration` | Create a collaboration in Box                                                        | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/create-collaboration.ts) |
| `delete-collaboration` | Delete or archive a collaboration in Box                                             | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/delete-collaboration.ts) |
| `get-collaboration`    | Retrieve a single collaboration from Box.                                            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/get-collaboration.ts)    |
| `list-collaborations`  | List collaborations from Box. Retrieves pending collaboration invites for this user. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/list-collaborations.ts)  |
| `update-collaboration` | Update a collaboration in Box                                                        | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/update-collaboration.ts) |

### Comments

| Function name    | Description                        | Type                                         | Source code                                                                                                        |
| ---------------- | ---------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `create-comment` | Create a comment in Box.           | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/create-comment.ts) |
| `delete-comment` | Delete or archive a comment in Box | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/delete-comment.ts) |
| `get-comment`    | Retrieve a single comment from Box | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/get-comment.ts)    |
| `list-comments`  | List comments for a file           | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/list-comments.ts)  |
| `update-comment` | Update a comment in Box            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/update-comment.ts) |

### Files

| Function name   | Description                                                                                         | Type                                           | Source code                                                                                                       |
| --------------- | --------------------------------------------------------------------------------------------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `copy-file`     | Copy a file to a different folder in Box.                                                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/copy-file.ts)     |
| `delete-file`   | Delete or archive a file in Box                                                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/delete-file.ts)   |
| `download-file` | Download file content from Box                                                                      | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/download-file.ts) |
| `get-file`      | Retrieve a single file from Box                                                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/get-file.ts)      |
| `list-files`    | List files from Box.                                                                                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/list-files.ts)    |
| `update-file`   | Update a file in Box. This can be used to rename or move a file.                                    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/update-file.ts)   |
| `files`         | Sync the metadata of specified files or folder paths from Box. A file or folder ID can be provided. | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/syncs/files.ts)           |

### Folders

| Function name    | Description                                                                                                                                       | Type                                         | Source code                                                                                                        |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `copy-folder`    | Copy a folder and its contents to a different location in Box.                                                                                    | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/copy-folder.ts)    |
| `create-folder`  | Create a folder in Box                                                                                                                            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/create-folder.ts)  |
| `delete-folder`  | Delete or archive a folder in Box                                                                                                                 | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/delete-folder.ts)  |
| `folder-content` | Fetches the top-level content (files and folders) of a folder given its ID. If no folder ID is provided, it fetches content from the root folder. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/folder-content.ts) |
| `get-folder`     | Retrieve a single folder from Box.                                                                                                                | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/get-folder.ts)     |
| `list-folders`   | List folders from Box                                                                                                                             | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/list-folders.ts)   |
| `update-folder`  | Update a folder in Box.                                                                                                                           | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/update-folder.ts)  |

### Search

| Function name | Description                                         | Type                                         | Source code                                                                                                |
| ------------- | --------------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `search`      | Search for files, folders, and other content in Box | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/search.ts) |

### Users

| Function name | Description                                                       | Type                                           | Source code                                                                                                     |
| ------------- | ----------------------------------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `create-user` | Creates a user in Box. Requires an enterprise account.            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/create-user.ts) |
| `delete-user` | Deletes a user in Box. Requires an enterprise account.            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/delete-user.ts) |
| `get-user`    | Retrieve a single user from Box                                   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/get-user.ts)    |
| `update-user` | Update a user in Box                                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/actions/update-user.ts) |
| `users`       | Fetches a list of users from Box. Requires an enterprise account. | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/syncs/users.ts)         |

### Others

| Function name    | Description                  | Type                                           | Source code                                                                                                      |
| ---------------- | ---------------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `collaborations` | Sync collaborations from Box | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/syncs/collaborations.ts) |
| `folders`        | Sync folders from Box        | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/box/syncs/folders.ts)        |

***
