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 webhook configuration.
Register an App
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/.
Enter 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.Note: “Read and write all files and folders” is required for most integrations.
Set Up Webhooks
If you plan to use webhooks to monitor events, you must set up webhooks with Box.
To set up webhooks:
- Navigate to your app.
- Click Webhooks in the left nav area.
- Scroll to the bottom of the page, and then click Create a new Webhook.
- Complete the General Information.
- Add any events that you want to monitor to Event Triggers.
- In Endpoint URL, enter
- Maintain a Payload format of REST.
- 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.Note: As long as the minimum configuration fields are set properly, any other additional fields can also be specified. These additional fields will be sent along in the webhook call.
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.