Skip to main content

Box Component

Manage files stored in Box

Component key: box

Changelog ↓

Description

Box is a file sharing platform that allows teams to collaborate and share files with one another. The Box component allows you to create, list, fetch, move, or delete files and folders in a customer's Box account.

API Documentation

This component was built using the Box REST API

A common integration pattern involves listing files in a file store, and performing a series of actions on the array of files that are returned. See our looping over files quickstart for information about how to create a loop over an array of files.

Connections

Box Developer Token

A Developer Token is a short-lived (60-minute) token that you can use for testing purposes. A developer token allows you to use the Box API to access your personal Box account only.

note

When your integration is ready for production, you'll need an OAuth 2.0 connection to authenticate your customers' Box accounts. You can also do your testing with OAuth.

InputNotesExample
Developer Token

A short-lived developer token for testing purposes

ABCDEFGHIJKLMNOPQRSTUVWXYZ123456

Box OAuth 2.0 Connection

This component authenticates with Box using OAuth 2.0. You will need to create a Box OAuth 2.0 app in order to authorize your integration to access your customers' Box accounts.

You can follow along with Box's OAuth 2.0 setup documentation here. Note:

  • Be sure to select User Authentication (OAuth 2.0) when creating a Custom App
  • Take note of your Client ID and Client Secret - you'll enter those in a moment
  • Under OAuth 2.0 Redirect URI, enter https://oauth2.prismatic.io/callback
  • Under Application Scopes, select Write all files and folders stored in Box
  • Leave CORS Domains blank

When you add a Box step to an integration, a Box OAuth 2.0 connection will be created for you. Enter the Client ID and Client Secret that you noted earlier. You can leave Scopes blank to use the Application Scopes that you set up previously. Or, you can pare down scopes as desired (reference Box's scopes documentation).

InputNotesExample
Authorize URL

The OAuth 2.0 Authorization URL for Box

https://account.box.com/api/oauth2/authorize
Client ID
Client Secret
Scopes

A space-delimited set of one or more scopes. Leave this blank to use your app's configured default scopes.

root_readwrite manage_webhook
Token URL

The OAuth 2.0 Token URL for Box

https://api.box.com/oauth2/token

Triggers

Webhook

Receive and validate webhook requests from Box for webhooks you configure. | key: webhook


Data Sources

Select File or Folder

Select file or folder from Box account base path | key: selectContent | type: picklist

InputNotesExample
Connection
Content Type

The type of content to select.

file
Limit

Provide an integer value for the maximum amount of items that will be returned. Provide a value from 1 to 1000.

100
Marker

Specify the pagination token that's returned by a previous request to retrieve the next page of results

lslTXFcbLQKkb0vP9Kgh5hy0Y0OnC7Z9ZPHPwPmMnxSk3eiDRMkct7D8E
Offset

The offset of the item at which to begin the response.

3

Select Webhook

Select webhook from Box account | key: selectWebhook | type: picklist

InputNotesExample
Connection

Actions

Adds a shared link to a file | key: addSharedLinkToFile

InputNotesExample
Connection
Shared Link

The URL of the shared link

https://app.box.com/s/1a2b3c4d5e
File ID

The unique identifier of the file

1234567890
Shared Link Access

The level of access for the shared link. Values: open, company, collaborators

open
Shared Link Password

The password for the shared link, if any

mypassword
Shared Link Permissions

The permissions for the shared link

Shared Link Vanity Name

The custom vanity name for the shared link

my-shared-link

Adds a shared link to a folder | key: addSharedLinkToFolder

InputNotesExample
Connection
Folder ID

The unique identifier that represents a folder

Shared Link

The URL of the shared link

https://app.box.com/s/1a2b3c4d5e
Shared Link Access

The level of access for the shared link. Values: open, company, collaborators

open
Shared Link Password

The password for the shared link, if any

mypassword
Shared Link Permissions Folder

The permissions for the shared link folder

Shared Link Vanity Name

The custom vanity name for the shared link

my-shared-link

Copy Object

Copy a Folder or File from one path to another | key: copyObject

InputNotesExample
Connection
From Path

This represents the source files's path. Include a leading /

/path/to/source/file.txt
To Path

This represents the destination files's path. Include a leading /

/path/to/destination/file.txt

{
"data": [
{
"id": "exampleId",
"type": "folder",
"name": "example"
}
]
}

Create Folder

Create a Folder at the specified path | key: createFolder

InputNotesExample
Connection
Path

This represents the files's path. Include a leading /

/path/to/file.txt

{
"data": {
"id": "exampleId",
"status": "active",
"name": "Example",
"created_at": "2020-01-01T12:00:00Z",
"description": "Example description.",
"folder": "exampleFolder"
}
}

Create Webhook

Create a webhook to send data from Box to an instance URL | key: createWebhook

InputNotesExample
Webhook URL

Reference a flow's URL from the trigger payload

https://example.com/webhook
Connection
Primary Signature Key

A signature key used to validate webhook requests

3T2eTfOvJbAIRoBpXsXPmq0gn8CmF5Q7
Secondary Signature Key

A signature key used to validate webhook requests

3T2eTfOvJbAIRoBpXsXPmq0gn8CmF5Q7
Target ID

The ID of the item that will trigger the webhook

375893453
Target Type

The type of item that will trigger the webhook

file
Trigger Type

Names of events that this webhook will be triggered for.

{
"data": {
"id": "1234",
"type": "webhook",
"target": {
"id": "22222",
"type": "folder"
},
"created_by": {
"type": "user",
"id": "33333",
"name": "Example User",
"login": "user@example.com"
},
"created_at": "2016-05-09T17:41:27-07:00",
"address": "https://example.com/webhook",
"triggers": [
"FILE.DOWNLOADED",
"FILE.UPLOADED"
]
},
"crossFlowState": {
"primarySignatureKey": "3T2eTfOvJbAIRoBpXsXPmq0gn8CmF5Q7"
}
}

Delete Instance Webhooks

Delete all Box webhooks that point to a flow in this instance | key: deleteInstanceWebhooks

InputNotesExample
Connection

Delete Object

Delete a Folder or File at the specified path | key: deleteObject

InputNotesExample
Connection
Path

This represents the files's path. Include a leading /

/path/to/file.txt

Delete Webhook

Delete a webhook by ID | key: deleteWebhook

InputNotesExample
Connection
Webhook ID

The ID of the webhook

375893453

{
"data": {}
}

Download File

Download the file at the specified path | key: downloadFile

InputNotesExample
Connection
Path

This represents the files's path. Include a leading /

/path/to/file.txt

{
"data": {
"type": "Buffer",
"data": [
101,
120,
97,
109,
112,
108,
101
]
},
"contentType": "application/octet"
}

Returns the file represented by a shared link | key: findFileForSharedLink

InputNotesExample
Connection
Fields

A comma-separated list of attributes to include in the response.

type,id,name
Shared Link

The URL of the shared link

https://app.box.com/s/1a2b3c4d5e
Shared Link Password

The password for the shared link, if any

mypassword

{
"data": {
"type": "file",
"id": "exampleId",
"name": "example"
}
}

Returns the folder represented by a shared link | key: findFolderForSharedLink

InputNotesExample
Connection
Fields

A comma-separated list of attributes to include in the response.

type,id,name
Shared Link

The URL of the shared link

https://app.box.com/s/1a2b3c4d5e
Shared Link Password

The password for the shared link, if any

mypassword

{
"data": {
"type": "folder",
"id": "exampleId",
"name": "example"
}
}

Get Current User

Get the information and metadata of the user that is currently logged in | key: getCurrentUser

InputNotesExample
Connection

{
"data": {
"type": "user",
"id": "33333",
"name": "Example User",
"login": "user@example.com",
"created_at": "2012-03-26T15:43:07-07:00",
"modified_at": "2012-12-12T11:34:29-08:00",
"language": "en",
"space_amount": 5368709120,
"space_used": 2377016,
"max_upload_size": 262144000,
"status": "active",
"job_title": "Employee",
"phone": "5555555555",
"address": "555 Office Drive",
"avatar_url": "https://app.box.com/api/avatar/deprecated"
}
}

Get File Download URL

Get a URL to download the file at the specified path | key: getFileDownloadUrl

InputNotesExample
Connection
Path

This represents the files's path. Include a leading /

/path/to/file.txt

{
"data": "example.com/files/file.txt"
}

Gets the shared link for a file | key: getSharedLinkForFile

InputNotesExample
Connection
File ID

The unique identifier of the file

1234567890

{
"data": {
"sharedLink": "https://app.box.com/s/abbvr71aw8a4gb7u2541hlv45l806u5h"
}
}

Gets the shared link for a folder | key: getSharedLinkForFolder

InputNotesExample
Connection
Folder ID

The unique identifier that represents a folder

{
"data": {
"sharedLink": "https://app.box.com/s/abbvr71aw8a4gb7u2541hlv45l806u5h"
}
}

List Folder

List Folder contents at the specified path. | key: listFolderWithPagination

InputNotesExample
Connection
Fetch All

Set to true to retrieve all results.

false
Fields/Metadata

Specify comma-separated attributes to include in the response. Supports metadata queries (e.g., metadata.enterprise_12345.contractTemplate). See https://developer.box.com/reference/resources/file--full for available fields.

content_created_at,name
Limit

Provide an integer value for the maximum amount of items that will be returned. Provide a value from 1 to 1000.

100
Marker

Specify the pagination token that's returned by a previous request to retrieve the next page of results

lslTXFcbLQKkb0vP9Kgh5hy0Y0OnC7Z9ZPHPwPmMnxSk3eiDRMkct7D8E
Offset

The offset of the item at which to begin the response.

3
Path

This represents the files's path. Include a leading /

/path/to/file.txt

{
"data": {
"entries": [
{
"id": "exampleId",
"type": "folder",
"name": "example"
}
],
"pagination": {
"next_marker": "exampleMarker",
"limit": 1000
}
}
}

List Folder (Deprecated)

List Folder contents at the specified path. This version of the action is being deprecated. Please replace action with List Folder. | key: listFolder

InputNotesExample
Connection
Limit

Provide an integer value for the maximum amount of items that will be returned. Provide a value from 1 to 1000.

100
Marker

Specify the pagination token that's returned by a previous request to retrieve the next page of results

lslTXFcbLQKkb0vP9Kgh5hy0Y0OnC7Z9ZPHPwPmMnxSk3eiDRMkct7D8E
Offset

The offset of the item at which to begin the response.

3
Path

This represents the files's path. Include a leading /

/path/to/file.txt

{
"data": [
{
"id": "exampleId",
"type": "folder",
"name": "example"
}
]
}

List Webhooks

List all webhooks configured in Box, including those for other integrations | key: listWebhooks

InputNotesExample
Connection
Fetch All

Set to true to retrieve all results.

false
Limit

Provide an integer value for the maximum amount of items that will be returned. Provide a value from 1 to 1000.

100
Marker

Specify the pagination token that's returned by a previous request to retrieve the next page of results

lslTXFcbLQKkb0vP9Kgh5hy0Y0OnC7Z9ZPHPwPmMnxSk3eiDRMkct7D8E
Show Only Instance Webhooks

Show only webhooks that point to this instance

true

{
"data": {
"next_marker": "ZmlQZS0xLTE%3D",
"entries": [
{
"id": "1234",
"type": "webhook",
"target": {
"id": "22222",
"type": "folder"
}
},
{
"id": "5678",
"type": "webhook",
"target": {
"id": "11111",
"type": "file"
}
}
],
"limit": 2
}
}

Move Object

Move a Folder or File from one path to another | key: moveObject

InputNotesExample
Connection
From Path

This represents the source files's path. Include a leading /

/path/to/source/file.txt
To Path

This represents the destination files's path. Include a leading /

/path/to/destination/file.txt

{
"data": [
{
"id": "exampleId",
"type": "folder",
"name": "example"
}
]
}

Path Details

Get detailed information about folders/files in the specified path | key: pathDetails

InputNotesExample
Connection
Path

This represents the files's path. Include a leading /

/path/to/file.txt

{
"data": [
{
"id": "exampleId",
"type": "file",
"name": "example"
}
]
}

Raw Request

Send raw HTTP request to Box | key: rawRequest

InputNotesExample
Connection
Data

The HTTP body payload to send to the URL.

{"exampleKey": "Example Data"}
Debug Request

Enabling this flag will log out the current request.

false
File Data

File Data to be sent as a multipart form upload.

[{key: "example.txt", value: "My File Contents"}]
File Data File Names

File names to apply to the file data inputs. Keys must match the file data keys above.

Form Data

The Form Data to be sent as a multipart form upload.

[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header

A list of headers to send with the request.

User-Agent: curl/7.64.1
Max Retry Count

The maximum number of retries to attempt. Specify 0 for no retries.

0
Method

The HTTP method to use.

Query Parameter

A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.

Response Type

The type of data you expect in the response. You can request json, text, or binary data.

json
Retry On All Errors

If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.

false
Retry Delay (ms)

The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.

0
Timeout

The maximum time that a client will await a response to its request

2000
URL

Input the path only (/2.0/folders), The base URL is already included (https://api.box.com). For example, to connect to https://api.box.com/2.0/folders, only /2.0/folders is entered in this field.

/2.0/folders
Use Exponential Backoff

Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.

false

Removes a shared link from a file | key: removeSharedLinkFromFile

InputNotesExample
Connection
File ID

The unique identifier of the file

1234567890

Removes a shared link from a folder | key: removeSharedLinkFromFolder

InputNotesExample
Connection
Folder ID

The unique identifier that represents a folder


Updates a shared link on a file | key: updateSharedLinkToFile

InputNotesExample
Connection
File ID

The unique identifier of the file

1234567890
Shared Link

The URL of the shared link

https://app.box.com/s/1a2b3c4d5e
Shared Link Access

The level of access for the shared link. Values: open, company, collaborators

open
Shared Link Password

The password for the shared link, if any

mypassword
Shared Link Permissions

The permissions for the shared link

Shared Link Vanity Name

The custom vanity name for the shared link

my-shared-link

Updates a shared link on a folder | key: updateSharedLinkOnFolder

InputNotesExample
Connection
Folder ID

The unique identifier that represents a folder

Shared Link

The URL of the shared link

https://app.box.com/s/1a2b3c4d5e
Shared Link Access

The level of access for the shared link. Values: open, company, collaborators

open
Shared Link Password

The password for the shared link, if any

mypassword
Shared Link Permissions Folder

The permissions for the shared link folder

Shared Link Vanity Name

The custom vanity name for the shared link

my-shared-link

Upload File

Upload a file to the specified path | key: uploadFile

InputNotesExample
Connection
File Contents

The contents to write to a file. This can be a string of text, it can be binary data (like an image or PDF) that was generated in a previous step.

My File Contents
Path

This represents the files's path. Include a leading /

/path/to/file.txt

{
"data": [
{
"id": "exampleId",
"type": "folder",
"name": "example"
}
]
}

Changelog

2025-09-15

Upgraded to the latest Box SDK version with enhanced object operations and improved webhook functionality.