Skip to main content
We no longer support the OpenWith UI element for any new customers as of December 21, 2021.
The Box Content Open With UI Element allows developers to embed a dropdown to open content stored in box with a partner application, or locally on the desktop. The Element fetches information about enabled integrations using the Box API, and calls out to partner services. Users can then take action in these services, and the edited content will be automatically saved back to Box. The integrations included in the Open With Element are Google Suite, and Box Edit. Additional information on the Google Suite integration can be found on the Box Community site. Currently, the element only supports for authentication.

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 https domain)
  • 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, the external_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.
Enable Integrations
Once your application has been activated for API calls it will need to be reauthorized in your enterprise. The steps for performing these actions are available .

List available integrations

The first step to assigning an app integration to a user is to get the list of integrations that are available. This GET request can be made with the following cURL request.
The app integration IDs are used to assign an integration to a given user.

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
While the two previous requests to get app integration information can be done with any valid token including a valid developer token, adding and removing app integrations requires a valid service account’s access token. Using a developer token will produce a 404 Not Found error.
The following POST request can be made to assign an app integration to an app user:
The ID in the JSON response can be used to manage app integrations after assignment, and should be stored by the application.

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 the item_execute_integration scope as well as the scope required by the specific integration you would like to use.
  • Google: item_readwrite on the parent folder
  • Adobe: root_readwrite
  • Box Edit: item_readwrite on the parent folder.
  • Box Edit Single File Collaboration: item_readwrite on the file.
More information on scopes can be found .

API

Parameters

Options

Currently the onError and onExecute events are subject to a known bug. We recommend using openWith.addListener('execute', callback) and openWith.addListener('error', callback) as a temporary workaround.

Events

Last modified on June 19, 2026