Installation
Box UI elements either through NPM or the Box CDN.Box Edit
Box Edit requires additional setup in order to be integrated into a platform application. Box Edit uses the desktop application Box Tools in order to open content locally.- Requests must use a secure connection (from an
httpsdomain) - The application’s domain must be allowed by Box Tools. Instructions can be found . The ideal workflow is to bundle these steps within an installer that also installs Box Tools.
- Safari requires a browser extension to connect to box tools. More details can be found here.
G Suite
A valid G Suite account is required in order to use the Box for G Suite integration. To connect a user’s G Suite and Box account, theexternal_app_user_id of the app user must be updated to be the email address
associated with the user’s G Suite account.
The external_app_user_id of an app user can be updated via the
endpoint.
Setup
The Open With UI Element is intended to be used after allowing your application and enabling integrations for app users using Box API endpoints.Activate application
The ‘Open With’ UI Element is available to any developer building with the Box Platform. To activate it for your instance, add the “Enable integrations” scope to your application in the developer console.
List available integrations
The first step to assigning an app integration to a user is to get the list of integrations that are available. ThisGET request can be made with the following
cURL request.
Get a specific integration
To obtain additional information about a specific integration, based on ID, the following GET request may be made.Add integration to user
To add an app integration to a valid app user, three pieces of information are required:- A valid Access Token.
- The ID of the app user to be assigned the integration
- The ID of the app integration to assign to the user
POST request can be made to assign an app integration to an app
user:
Remove integration from user
To remove an app integration from an app user, the following request may be made with a valid service access token and the app integration assignment ID from the previous step.Sample HTML
Demo
Open With Example
Content Explorer + Open With Example
Access TokenThese demos may not fully function until you provide a valid access token under
the JS tab of the demo. For the Open With element, you must provide a valid
Access Token.
Authentication
The UI Elements are designed in an authentication agnostic way so whether you are using UI Elements for users who have Box accounts (Managed Users) or non-Box accounts (App Users), UI Elements should work out of the box. The reason for this is that UI Elements only expect a “token” to be passed in for authentication, and Box provides two different ways to generate tokens - OAuth and JWT.Learn about selecting an authentication method
Scopes
To run integrations with downscoped tokens, you must include theitem_execute_integration scope as well as the scope required by the specific
integration you would like to use.
- Google:
item_readwriteon the parent folder - Adobe:
root_readwrite - Box Edit:
item_readwriteon the parent folder. - Box Edit Single File Collaboration:
item_readwriteon the file.
