Box connection

You can create a connection asset for the Box platform in a project or in a catalog. If you have a Watson Machine Learning service instance, you can promote the connection asset from a project to a deployment space. 

The Box platform is a cloud content management and file sharing service.

Supported tools

These tools support Box connections:

  • Data Refinery

Create a custom app in Box

Before you create a connection to Box, you create a custom app in the Box Developer Console. You can create an app for application-level access that users can use to share files, or you can create an app for enterprise-wide access to all user accounts. With enterprise-wide access, users do not need to share files and folders with the application.

  1. Go to the Box Developer Console, and follow the wizard to create a Custom App. For the Authentication Method, select OAuth 2.0 with JWT (Server Authentication).

  2. Make the following selections in the Configuration page. Otherwise, keep the default settings.
    • Select one of two choices for Application Access:
      • Keep the default Application selection to allow access where users share files.
      • Select Enterprise to create an app with enterprise-wide access to all user accounts.
    • Add and Manage Public Keys:
      Click Generate a Public/Private Keypair. This selection requires that two-factor authentication is enabled on the Box account, but you can disable it afterward. The generated key pair produces a config (*_config.json) file for you to download. You will need the information in this file to create the connection in Watson Studio.
  3. Submit the app client ID to the Box enterprise administrator for authorization: Go to your application in the Box Developer Console and select the General link from the left sidebar in your application. Scroll down to the App Authorization section.

Create the Box connection in Watson Studio

  1. From the project page, go to Add to project > Connection, then select the Box connection.
  2. Enter the values from the downloaded config file for these settings:
    • Client ID
    • Client Secret
    • Enterprise ID
    • Private Key (Replace each \n with a newline)
    • Private Key Password (The passphrase value in the config file)
    • Public Key (The publicKeyID value in the config file)

Enterprise-wide app

If you configured an enterprise-wide access app, enter the username of the Box user account in the User name field.

Application-level app

Users must explicitly share their files with the app’s email address in order for the app to access the files.

  1. Make a REST call to the connection to find out the app email address. For example:

    PUT https://api.dataplatform.cloud.ibm.com/v2/connections/{connection_id}/actions/get_user_info?project_id={project_id}

    Request body:

    {}

    Returns:

    { "login_name": "[email protected]" }

  2. Share the files and folders in Box that you want accessible from Watson Studio with the login name that was returned by the REST call.

Watson Studio and Watson Knowledge Catalog plans

The Box connection is available on all Watson Studio and Watson Knowledge Catalog plans.

Learn more

Box custom apps