Skip to main content
Question

Create persistent webhook for Google Cloud Function

  • May 22, 2025
  • 1 reply
  • 31 views

Forum|alt.badge.img

I need a way to authenticate with Box programmatically without using the Developer Token that expires every hour.

I'm creating a webhook to monitor a folder for new files, send the HTTP request to GCP, fetch the new file, run some data wrangling on it, and upload a new file to another specified folder.

How can I create a webhook that persists past the Developer Token lifespan?

1 reply

Forum|alt.badge.img

HI Rommel

I think your best bet is to use JWT authentication: https://developer.box.com/guides/authentication/jwt/

This requires a one time authorisation from your Box admin and then you will be able to programmatically create tokens when your function executes.

I haven't got any direct instructions for GCP but here is a github repo that use this pattern for a lambda function in AWS https://github.com/box/samples/tree/master/box-node-webhook-to-lambda-sample

The architectures are pretty similar so you should be able to use this for GCP (I have done this before)

Rgds, 
Peter Christensen, Platform Solutions Engineer, Box