This project contains a workshop on integrating Box webhooks and GCP Cloud Functions.
- Create a Box free developer account if you don't already have one.
- Complete the registration process for a Box developer account.
- Making sure you're logged in navigate to the Box Developer Console. This will activate your developer account.
- Create a new Box application. Select Custom App, fill in the form and then click Next.
- Select Client Credentials Grant and then click Create App.
- Check all boxes in application scopes.
- (or only what you think will be necessary)
- Click Save Changes.
- Flip to the Authorization tab and submit your app for review.
- Go to the Administrator console, and under Apps, Custom Apps Manager, authorize your app.
- Note the Client ID and Client Secret. You will need these later.
git clone git@github.com:barduinor/box-webhooks-gcp.git
cd box-webhooks-gcp
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
cp sample_oauth.env .oauth.env
python3 -m venv .venv
.venv\Scripts\activate.bat
pip install --upgrade pip
pip install -r requirements.txt
python3 -m venv .venv
.venv\Scripts\Activate.ps1
pip install --upgrade pip
pip install -r requirements.txt
copy sample.env.local .env.local
copy sample.env.yaml .env.yaml
code .
Update the CLIENT_ID, CLIENT_SECRET, ENTERPRISE_ID, and CCG_USER_ID field values in BOTH env files with the Box application client id and client secret you created on the developer console. The webhook keys will be available when you create the webhook.
export CLIENT_ID=YOUR_CLIENT_ID
export CLIENT_SECRET=YOUR_CLIENT_SECRET
export ENTERPRISE_ID=YOUR_ENTERPRISE_ID
export CCG_USER_ID=YOUR_USER_ID
CLIENT_ID: "YOUR_CLIENT_ID"
CLIENT_SECRET: "YOUR_CLIENT_SECRET"
ENTERPRISE_ID: "YOUR_ENTERPRISE_ID"
CCG_USER_ID: "YOUR_USER_ID"
Reference the article Working with GCP Cloud Functions and Box webhooks, and go through the steps to complete the workshop.
If you get stuck or have questions, make sure to ask on our Box Developer Forum