{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":21481,"path":"integrate-applications/integration-hub/setup-box-spoke.md","title":"Set up the Box spoke","bundle":null,"doc_type":null,"release":"australia","body":"\n# Set up the Box spoke\n\nIntegrate your ServiceNow instance and the Box APIs to automate the Box spoke actions. For example, you can set up a flow that removes a file in your Box account. When you set up the Box spoke, this flow is automated.\n\n## Before you begin\n\n-   Request an Integration Hub subscription.\n-   Activate the Box spoke.\n-   Access to Box developer's console.\n-   Role required: admin.\n\n## Create an OAuth application\n\nCreate a custom OAuth application from your Box account to enable OAuth 2.0 authentication with the Box spoke.\n\n### Before you begin\n\nBox requirements:\n\n-   Box account\n-   Box administrator credentials\n-   Role required: admin\n\n### About this task\n\nComplete these steps from your Box account. See the [Box Developer Portal](https://developer.box.com/) documentation for instructions on creating and configuring custom applications.\n\n### Procedure\n\n1.  Log in to the [Box developer's console](https://app.box.com/developers/console).\n\n2.  Select **Create New App**.\n\n    \\[Omitted image \"box-spoke-create-new-app-icon.png\"\\] Alt text: Emphasizes the Create New App button\n\n3.  Select **Custom App**.\n\n    \\[Omitted image \"box-spoke-custom-app-button.png\"\\] Alt text: Emphasizes the Custom App option\n\n4.  Complete the form.\n\n<table id=\"table_am5_5bf_czb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nValue\n\n</th></tr></thead><tbody><tr><td>\n\n**App Name**\n\n</td><td>\n\n`Box App`\n\n</td></tr><tr><td>\n\n**Description \\(optional\\)**\n\n</td><td>\n\nLeave this field empty\n\n</td></tr><tr><td>\n\n**Purpose**\n\n</td><td>\n\nSelect**Custom Portal**\n\n</td></tr></tbody>\n</table>5.  Select **Next**.\n\n    The Create a Custom App modal appears.\n\n6.  Select **User Authentication \\(OAuth 2.0\\)**.\n\n7.  To confirm, select **Create App**.\n\n    You are in your application's configuration settings.\n\n8.  In the OAuth 2.0 Credentials section, copy the Client ID and Client Secret.\n\n    You need this information to register the application as a third-party OAuth provider on your ServiceNow instance.\n\n9.  In the Application Scopes section, enable the scope permissions you want to support.\n\n<table id=\"table_qlp_sqh_gfb\"><thead><tr><th>\n\nApplication Scopes\n\n</th><th>\n\nUse for\n\n</th></tr></thead><tbody><tr><td>\n\nRead and write all files and folders stored in Box\n\n</td><td>\n\nDocument management, document sharing, and folder management actions\n\n</td></tr><tr><td>\n\nManage users\n\n</td><td>\n\nUser management actions\n\n</td></tr><tr><td>\n\nManage groups\n\n</td><td>\n\nGroup management actions\n\n</td></tr><tr><td>\n\nManage enterprise properties\n\n</td><td>\n\nDocument sharing, group management, and user management actions\n\n</td></tr><tr><td>\n\nManage webhooks\n\n</td><td>\n\nConfiguring V2 webhooks\n\n</td></tr><tr><td>\n\nManage AI\n\n</td><td>\n\nInteract with Box AI actions\n\n</td></tr></tbody>\n</table>10. Select **Save Changes**.\n\n\n## Configure a connection record for the Box spoke\n\nAdd and configure a Box connection to authenticate ServiceNow requests in a Box spoke.\n\n### Before you begin\n\nRole required: admin\n\n### Procedure\n\n1.  In your ServiceNow instance, navigate to **All** &gt; **Process Automation** &gt; **Workflow Studio**.\n\n2.  Click the **Integrations** tab.\n\n3.  Under **Connections**, toggle and enable the **Outbound** connections.\n\n4.  Locate the alias for **Box** and click **View Details**.\n\n    -   To configure the default connection and credential alias record that is shipped along with the Box spoke, click **View Details**.\n\n        \\[Omitted image \"box-conn-view-det.png\"\\] Alt text: View details of the Box connection.\n\n    -   To manage more than one Box spoke connection records, you should create a new child alias record by clicking **Add Connection**. For more information about using multiple connections, see [Supporting multiple connections](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/integration-hub/support-multiple-connections.md).\n    If you are configuring the spoke for the first time, click **Configure**. Otherwise, click **Edit**.\n\n    \\[Omitted image \"box-conf-connection.png\"\\] Alt text: Configure the Box connection.\n\n5.  On the form, fill these values.\n\n<table id=\"table_hjv_tsb_h2c\"><thead><tr><th>\n\nField\n\n</th><th>\n\nValue\n\n</th></tr></thead><tbody><tr><td>\n\nConnection Name\n\n</td><td>\n\n`Box`.\n\n</td></tr><tr><td>\n\nConnection URL\n\n</td><td>\n\nThe instance URL in this format:`<provider-domain-name>.net`.\n\n</td></tr><tr><td>\n\nCredential Name\n\n</td><td>\n\n`Box Upload Credentials`.\n\n</td></tr><tr><td>\n\nOAuth Name\n\n</td><td>\n\n`Box OAuth`.\n\n</td></tr><tr><td>\n\nOAuth Client ID\n\n</td><td>\n\nThe application client ID. For more information, see [Create an OAuth application](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/integration-hub/setup-box-spoke.md).\n\n</td></tr><tr><td>\n\nOAuth Client Secret\n\n</td><td>\n\nThe application client secret. For more information, see [Create an OAuth application](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/integration-hub/setup-box-spoke.md).\n\n</td></tr><tr><td>\n\nOAuth Redirect URL\n\n</td><td>\n\nThe URL in this format: `https://<ServiceNow-instance-name>.service-now.com/oauth_redirect.do`. Replace `<ServiceNow-instance-name>` with your ServiceNow instance name.\n\n</td></tr></tbody>\n</table>    \\[Omitted image \"box-connection.png\"\\] Alt text: Configure the Box connection.\n\n6.  Click **Configure Connection**.\n\n\n### Result\n\nThe spoke connection is configured and ready to be used.\n\n**Note:** OAuth tokens expire after 30 days. An administrator can regenerate the spoke OAuth token every 30 days.\n\n## Regenerate Box OAuth token\n\nRegenerate the Box OAuth token when it expires. The Box spoke OAuth token expires every thirty days.\n\n### Before you begin\n\nRole required: admin\n\n### Procedure\n\n1.  In your ServiceNow instance, navigate to **All** &gt; **Process Automation** &gt; **Flow Designer**.\n\n2.  Select the **Connections** tab.\n\n3.  Search for the **Box** connection alias.\n\n4.  Select **View Details**.\n\n5.  Select **Get OAuth Token** for the connection.\n\n\n### Result\n\nThe Box spoke receives a new OAuth access token. It expires in 30 days.\n\n## Integrate ServiceNow instance with JWT Bearer grant type\n\nSet up an OAuth provider with the JWT Bearer grant type to integrate your ServiceNow instance with Box.\n\n### Before you begin\n\nRole required: admin\n\n### Procedure\n\n1.  Do the steps at the Box end.\n\n    1.  Sign Up for [Box Developer Account](https://developer.box.com).\n\n    2.  On the [Developer Console](https://app.box.com/developers/console), select **Custom App**.\n\n    3.  Confirm that the authentication method is OAuth 2.0 with JWT \\(Server Authentication\\).\n\n    4.  Enter a unique name for the app and create the app.\n\n    5.  View the app.\n\n    6.  On OAuth 2.0 Credentials, copy the Client ID and Client Secret.\n\n    7.  Create a new keystore and export a public key from that into BOX.\n\n    8.  Note the enterpriseID under the App Settings.\n\n    9.  Navigate to **My apps** &gt; **&lt;App Name&gt;** &gt; **General** &gt; **Submit for Authorization**.\n\n    10. Select your account name on the top of the Admin Console.\n\n    11. In your account, create a folder and upload a text file.\n\n2.  Do the steps at the ServiceNow instance end.\n\n    1.  Navigate to **System Definition** &gt; **Certificates** &gt; **New** &gt; **Type** &gt; **Storepass**.\n\n    2.  Attach the keystore certificate.\n\n    3.  Configure a JWT signing key by navigating to **System OAuth** &gt; **JWT Keys** &gt; **New**.\n\n    4.  Create OAuth application registry entry by navigating to **System OAuth** &gt; **Application Registry** &gt; **New** &gt; **Connect to a third party OAuth Provider** &gt; **Default Grant type \\( JWT Bearer\\)**.\n\n    5.  Under the OAuth entity profile \\(oauth\\_entity\\_profile\\) associate the created 'jwt provider'.\n\n    6.  Create a REST message.\n\n    7.  In the REST Message, select **Get OAuth token** to get the access token.\n\n    8.  Go to the 'Default GET' method and click on 'Test'.\n\n    9.  An the BOX end, share the folder and file.\n\n\n"}}