Box Connector 5.3 Additional Configuration | MuleSoft Documentation
# Box Connector 5.3 Additional Configuration
To use Box Connector in a Mule app, configure a global Box configuration element to use by as many Box connectors as needed for your application.
## Configure the Box Connector Global Element
  1. Click the **Global Elements** tab at the base of the canvas.
  2. In the **Global Configuration Elements** screen, click **Create**.
  3. In the **Choose Global Type** wizard, expand Connector Configuration and select **Mule-box-connector Config** and click **OK**. In the configuration screen for `OAUTH 2.0` with Authorization Code, grant type displays. This is the only configuration that Box Connector supports.
  4. Configure the properties as described here.
Parameter | Description  
---|---  
Specifies the client identifier as assigned by the authorization server when the client application was registered.  
`clientSecret` |  Specifies the client application’s client secret.  
The host where Box exposes its API.  
The port where Box services listen for incoming requests. Default: 443  
The base path for the Box services' base URI.  
The protocol which Box services follow. Default: HTTPS  
`localCallbackPath` |  The local callback path. Default: /callback  
`localCallbackConfig` |  The HTTP Listener configuration that is used to configure the local authorization URL.  
`externalCallbackUrl` |  The redirect URL that is configured in the client application.  
`localAuthorizationUrl` |  Local authorization URL that is used to initiate an `OAuth2` dance.  
`authorizationUrl` |  The authorization URL to request for an authorization code.  
`accessTokenUrl` |  Specifies the URL for requesting an access token.  
In the `OAUTH 2.0` configuration screen, the placeholder values refer to a configuration file `mule-artifact.properties` placed in the `src/main/resources` folder of your project.
You can either enter your credentials into the global configuration properties, or reference a configuration file that contains these values.
Use a configuration file for simpler maintenance and better reusability of your project. Keeping these values in a separate file is useful if you need to deploy to different environments where your access credentials are different, such as production, development, and QA.   
---  
  5. Click **OK**.


## JWT Authentication
Authenticate your application directly to Box using a JSON Web Token (JWT).
The following steps describe how to configure Box Connector using JWT:
  *   * Generate a Keypair
  * Export and Add the Public Key


### Create an App
  1. Go to the Developer Console.
  2. Select **Create New App**.
  3. Select **Custom App** for the type of application.
  4. Select **Server Authentication (with JWT)** for the type of authentication.
  5. Provide a name for the application.
  6. Click **Create App**.


### Generate a Keypair
  1. Download KeyStore Explorer.
  2. Open the application and select **Create a new KeyStore**.
  3. Select **JKS**.
  4. Click **OK**.
  5. Click on **Tools** and select **Generate Key Pair**.
  6. Select **RSA** with a key size of 2048.
  7. Click **OK** to prompt the **Generate Key Pair Certificate** dialog box to appear.
  8. Accept the default settings.
  9. Click on the **Name** icon and add the following information:
     * **Common Name (CN)** : mulesoft
     * **Organization Unit (OU)** : mulesoft
     * **Organization Name (O)** : mulesoft
     * **Locality Name (L)** : mulesoft
     * **State Name (ST)** : mulesoft
     * **Country ©** : CA
  10. Click **Save** to prompt the **New Key Pair Entry Alias** dialog box to appear.
  11. Enter **mulesoft** as the alias.
  12. Click **OK** to prompt the **New Key Pair Entry Password** dialog box to appear.
  13. Enter a new password.
  14. Click **OK** to successfully generate your keypair.


### Export and Add the Public Key
  1. Right-click on the generated keypair and navigate to **Export** > **Export Public Key**.
  2. Save your keystore and set a password.
  3. Open the exported public key in the editor and copy all the content.
  4. Go to the Developer Console.
  5. Go to the **Configuration** tab and scroll down to the **Add and Manage Public Keys** section.
  6. Click **Add a Public Key** and paste all the copied content.
  7. Click **Verify and Save**.
  8. After successful verification, you will receive the **Public key id**. You can also find other properties that depend on your application, such as **Entity id** and **Box sub type** , in the Developer Console on the **General Settings** tab in the **App Info** section and add them to the Studio configuration.


## Next
Now that you have completed configuration, you can try out the Box Connector Examples.
## See Also
MuleSoft Help Center