Connections > Box connection properties > Connect to Box
  

Connect to Box

Let's configure the Box connection properties to connect to Box.

Before you begin

Before you get started, you need to configure OAuth for your Box account.
When you configure OAuth, specify the redirect_URI parameter. Box verifies that the redirect_uri parameter passed in the authorization URL in your Box connection matches with the redirect URI configured for the application.
When you configure a Box connection, you have the option to either autogenerate the access token in the connection, or manually generate the token. If you prefer to handle the token generation process yourself, you can manually generate the access token, along with the grant type, client ID, and client secret when you configure OAuth in Box.
For more information on how to set up OAuth to access Box, see the Box documentation.
The following video shows you how to autogenerate the OAuth access token when you configure a Box connection:
https://infa.media/3pNnFpL

Connection details

The following table describes the basic connection properties:
Property
Description
Connection Name
Name of the connection.
Each connection name must be unique within the organization. Connection names can contain alphanumeric characters, spaces, and the following special characters: _ . + -,
Maximum length is 255 characters.
Description
Description of the connection. Maximum length is 4000 characters.
Type
Box
Use Secret Vault
Stores sensitive credentials for this connection in the secrets manager that is configured for your organization.
This property appears only if secrets manager is set up for your organization.
This property is not supported by Mass Ingestion.
When you enable the secret vault in the connection, you can select which credentials that the Secure Agent retrieves from the secrets manager. If you don't enable this option, the credentials are stored in the repository or on a local Secure Agent, depending on how your organization is configured.
For information about how to configure and use a secrets manager, see Secrets manager configuration.
Runtime Environment
The name of the runtime environment where you want to run tasks.
Select a Secure Agent, Hosted Agent, or serverless runtime environment.
Hosted Agent doesn't apply to mappings in advanced mode.
Access Token Type
The access token to authenticate and authorize access to resources in the endpoint server.
You can select from the following options:
  • - Auto Generated. Box autogenerates the access token in the connection when you click Get Token.
  • - Manual. Get the OAuth details from your Box account and enter the details manually in the connection.
Default is Auto Generated.

Autogenerate the access token

The connection is by default selected to autogenerate.
The following table describes the property and action required to autogenerate the access token from Box:
Property
Description
OAuth Access Token
Access token generated by Box.
Click Get Token so that Box generates the access token and populates this field for you.
For more information, see Generate the OAuth access token. For a visual presentation, you can check out the Generating the access token video.

Manually generate the access token

To manually enter the OAuth properties, select the Access Token Type as Manual, and then enter the required properties:
The following table describes the OAuth properties that you need to connect to Box manually:
Property
Description
Access Token
Enter the manually generated OAuth access token value in Box.
Client Id
The client identifier issued to the client during the application registration process in Box.
Client Secret
The client secret key issued to the client during the application registration process in Box.
Grant Type
The grant type to connect to Box.
Enter the string refresh_token.
Refresh Token
Enter the refresh token value.
If the access token expires, you can use the refresh token to generate a new access token.
Note: When you use the manual access token type and the refresh token expires, you need to re-enter the connection properties.

Advanced settings

The following table describes the advanced connection properties:
Property
Description
URI Request Parameters
Parameters to search for files or folders in Box.
Specify the search string in the following format:
query=search_string;content_types=<name|description|file_content|comments|tags;limit=<number>;offset=<number>
For example, to search for objects that contain the word "generate", you can enter the following string: query=generate;content_types=name;limit=0;offset=0.
You can use wildcard characters and enclose phrases or multiple query strings within double quotes to refine your search criteria.
For more information, see URI request parameters.
Source File Path
This property doesn't apply to the Box connection.
Target File Path
Optional. A directory on the Secure Agent machine where you can download objects from Box.
Enter a path to download files or folders to a specific directory.
By default, the Secure Agent downloads all the Box objects to the root directory in the Secure Agent machine.
Response Folder Path
This property doesn't apply to a Box connection.
Box File or Folder ID
File ID or the folder ID of the file or folder in Box from where you want to read data from or write data to Box.
You can get the file ID or folder ID from the Box URL of the file or folder.
For example, the Reports folder in Box has the following URL: https://app.box.com/folder/50016834230
In the URL, 50016834230 is the folder ID of Reports.
Note: You can override this value when you read from or write to CSV files in Box.