This article describes how to connect to Box.com using HTTP Client Connector with OAuth 2.0 authentication.
Provide the ability to connect AtomSphere with the Box.com REST API using the OAuth 2.0 protocol for authentication.
The approach will use the AtomSphere HTTP Client Connector to interact with the Box.com REST API and retrieve a list of Box.com user accounts. While doing so we will configure the necessary OAuth 2.0 settings in accordance with Box.com’s implementation of OAuth 2.0.
The approach consists of the following steps:
- Use the AtomSphere HTTP Connector to initiate and execute REST based requests against Box.com.
- Configure a sample Box.com application and authorize the respective Boomi AtomSphere process.
- Configure the required authentication settings within the HTTP Client Connector in accordance with Box.com OAuth 2.0 parameters.
- Perform a simple request to retrieve Box.com user accounts
The following steps detail how to deploy a process using the AtomSphere HTTP Client Connector when connecting to Box.com’s REST API:
- Create Box.com Application
- Record the Box.com OAuth 2.0 Parameters for reference later
- Design a Boomi AtomSphere Process using the HTTP Client Connector
- Configure HTTP Client Connector with the respective Box.com OAuth 2.0 parameters recorded previously
- Specify the proper resource path for the Box.com REST API Endpoint to retrieve users.
1. Create Box.com Application
Navigate to https://app.box.com/developers/services/edit/ and follow the instructions to create a new Box Application:
2. Specify Box.com OAuth 2.0 Parameters
Note the following parameters to use later when configuring the HTTP Client Connector:
|Box.com OAuth 2.0 Parameter||Value|
|client_id||ml0yrwnjsv7ywyvjct4op3eq1afgksos - [sample ID]|
|client_secret||v5u0Ha0ig05OrFfPQjC1afO1dztp0bOp - [sample secret]|
3. Start to Build a Sample AtomSphere Process
Design a simple integration process to validate your Box.com connection. Bypass the HTTP Client Connection and Operation until the next step:
4. Configure your HTTP Client Connection and Operation
1. Configure the HTTP Client Connection with the following parameters:
|Authentication Type||OAuth 2.0|
|Grant Type||Authorization Code|
|Client ID||ml0yrwnjsv7ywyvjct4op3eq1afgksos - [sample ID]|
|Client Secret||v5u0Ha0ig05OrFfPQjC1afO1dztp0bOp - [sample secret]|
|Authorization Token URL|
|Scope||<Intentionally left blank for this example>|
(Name | Value)
(Name | Value)
|None (leave blank)|
|Access Token URL||https://api.box.com/oauth2/token|
2. After defining the parameters, click the “Regenerate” button to regenerate the Access Token. This token will be saved and used for future requests against Box.com.
5. Configure the HTTP Client Connector Operation
Since we are performing a simple GET request there is no need for a request profile, however there is a JSON response profile specified. A sample of the JSON response is provided below in addition to this screenshot of the operation:
With a simple test run of the process, the HTTP Client should be able to make a successful connection to https://api.box.com/2.0/users and retrieve a complete JSON response provide detailed below.
Sample JSON Response:
"name": "Test Account1",