Co-author – P Venkata Subba Reddy (PVS Reddy)
This guide provides a step-by-step approach to connecting the Box node in IBM App Connect Enterprise (ACE). It covers the configuration of Box credentials, authentication setup, and how to integrate Box with other applications using flows in ACE.
Generating Access Token, Refresh Token, Client ID, and Client Secret for Box in ACE:-
This guide explains the process of obtaining an access token, refresh token, client ID, and client secret for authenticating the Box node in IBM App Connect Enterprise (ACE). It covers OAuth configuration, token generation, and secure integration with Box for seamless data exchange.
Prerequisites: You need an active Box account with the necessary API permissions to generate authentication credentials.
-
Log in to your Box account.
-
Navigate to Box Developer Console.
-
Click on "My Platform Apps".
-
Click on "Create Platform App".
-
Select "Custom App" as the app type.
-
Enter a desired App Name (e.g., ACEDemo).
-
In the Purpose section, choose "Automation" from the drop down menu.
-
Click Next.
-
Under Select an authentication method, choose "User Authentication (OAuth 2.0)".
-
Click "Create App" to finalize the setup.
Image 1:-

Image 2:-

-
Navigate to the Configuration section under OAuth 2.0 Redirect URIs. and add the redirect URL: https://www.google.com.
-
Go to the Application Scopes section and check the box for Write all files and folders stored in Box.
- Click on Save Changes.

-
Now, Navigate to the OAuth 2.0 Credentials section.
-
Retrieve the Client ID and Client Secret.
-
Replace <client_id>
in the following URL with your actual Client ID:
-
Open the modified URL in a web browser to obtain the authorization code.
-
You will be redirected to https://www.google.com with a URL format like:
https://www.google.com/?code=<code>
-
Copy the authorization code from the URL.
-
Open the command prompt (CMD) or terminal.
-
Run the following command, replacing
<CLIENT_ID>
, <CLIENT_SECRET>
, and <CODE>
with your actual values:
curl -i -X POST "https://api.box.com/oauth2/token" \
-H "content-type: application/x-www-form-urlencoded" \
-d "client_id=[CLIENT_ID]" \
-d "client_secret=[CLIENT_SECRET]" \
-d "code=[CODE]" \
-d "grant_type=authorization_code"
The response will contain the access token and refresh token. Copy and save them securely.
Response:-
HTTP/2 200
{"access_token":"lOMa0TI1ZPtFruZVnDgvSVaBCF7a8GAe","expires_in":4062,"restricted_to":[],"refresh_token":"L5iBgNfsTFc7dJlRtr2IiXP3Eo5YVHwafEYFFRTY5r3pAR37imeJM1NCqUJ4BOzq","token_type":"bearer"}%
Creating a Simple Flow to Retrieve Folders from Your Box Account:-
-
Open the Toolkit.
-
Create a new Application and name it boxDemo.
-
Inside the boxdemo application, create a new Message Flow and name it boxDemo.
-
Drag and drop the following nodes onto the canvas:
-
HTTP Input
-
Box Request
-
HTTP Reply
-
Connect the nodes in the following sequence:
-
For HTTP Input node under properties section set the Path Suffix for URL as /box/test
.
-
Double-click on the Box Request node and select Launch Connector Discovery.
-
Create a new Policy Project named BoxDemo_Policy
and set up an external directory vault.
-
The Connector Discovery tab will open. Click on Box, where you will see an option to Connect to Box to see more items.
-
In the dropdown menu, select Admin User as the type.
-
Enter the required credentials: Access Token, Refresh Token, Client ID, and Client Secret.
-
Click Connect to complete the setup.

- In the Folder section, select Retrieve Folders and save the changes.
Creating an Integration Node and Integration Server on ACE Runtime:-
- Important: Ensure that the ACE Toolkit and Runtime are on the same version.
- Source the mqsiprofile
[root@12011ACE1 ~]# cd /home/jahnavi/ace-12.0.12.10/server/bin
[root@12011ACE1 bin]# . ./mqsiprofile
- Create an Integration node with the vaultkey
[root@12011ACE1 bin]# mqsicreatebroker <Integration_Node> --vault-key <Vault_Key>
ex:-
[root@12011ACE1 bin]# mqsicreatebroker Box_Demo --vault-key myvaultkey
BIP8071I: Successful command completion.
- Start the Integration node by providing the vaultkey
[root@12011ACE1 bin]# mqsistart <Integration_Node> --vault-key <Vault_Key>
ex:-
[root@12011ACE1 bin]# mqsistart Box_Demo --vault-key myvaultkey
- Creating an Integration server
[root@12011ACE1 bin]# mqsicreateexecutiongroup <Integration_Node> -e <Integration_Server>
ex:-
[root@12011ACE1 bin]# mqsicreateexecutiongroup Box_Demo -e Box_Demo_SVR
BIP1124I: Creating integration server 'Box_Demo_SVR' on integration node 'Box_Demo'...
BIP1117I: The integration server was created successfully.
BIP8071I: Successful command completion.
- Configure the server by providing the necessary mqsicredentials to authenticate and establish secure communication.
mqsicredentials <Integration_Node> -e <Integration_Server> --create --credential-name <Policy_Project_Credential_Name> --credential-type box --client-id <Client_ID> --client-secret <Client_Secret> --access-token <Access_Token> --refresh-token <Refresh_Token>
ex:-
mqsicredentials Box_Demo -e Box_Demo_SVR --create --credential-name BoxDemo_policy_Box1 --credential-type box --client-id m6cdilabcdelvv6enej9ihh5huewbpnc --client-secret gowET1p61X1a2bhHKRgt7k8ZE2j7Wh5Y --access-token 5XDZeftHgYqMg23dJXnre5yPrXfdbsKX --refresh-token wDB9HWCjl3cZz8duvWSSZDWuJ0SV9LahtM12ne8diWw4Dqqr97lzukIjruHUracH
From ACE Toolkit, Connecting the Integration Node and Deploying the Flow
-
Connect the Integration Node to the ACE Toolkit by providing Host name and Port.
-
Now deploy the Policy project and the integration flow to the connected node.
-
Validate the deployment and test the flow execution.
-
Now hit the URL and validate the results
http://<Host_name>:<port>/box/test
