To authenticate a Box element instance you must register an app with Box and know the client_id, client__secret, and redirect_uri of the app. You will use these as the API Key, API Secret, and Callback URL when you authenticate an element instance.
If you plan to use events, you also need to perform some additional configuration.
To setup the endpoint for Box, complete the setup steps described in this section.
Via a web browser, go to https://app.box.com/developers/services/edit/.
Input an application name.
Select the type of Box application.
Click Create Application
After the Box application is created, click Configure your application.
Copy the client_id and the client_secret.
Input a redirect_uri (your app’s callback URL).
Select the appropriate Scopes for the application.
If you plan to use webhooks to monitor events, you must set up webhooks with Box.
To set up webhooks:
https://api.cloud-elements.com/elements/api-v2/events/box
.Create the following Callback Parameters:
Method | Parameter Name | Parameter Value |
---|---|---|
Post | itemType | #item_type# |
Post | newItemId | #newitemid# |
Post | userId | #touserids# |
Post | event | #event_type# |
Post | itemId | #item_id# |
Click Save Webhook.
Box requires you to submit a Support Request to enable webhooks for your app. You must complete this step before you will receive events from Box. Go to this URL: https://developers.box.com/view-webhooks/
Scroll to the bottom of the page and click Contact Us to submit a request. You will need your API Key. This can be found at the bottom of the app configuration screen.