defineHttpEndpoint
to receive webhooks, verify them, and create an HTTP Trigger.
You should read the HTTP endpoint documentation to understand how to create an HTTP endpoint.
Examples
Cal.com
Cal.com has webhooks that closely follow conventions, and so are easy to use.Cal.com
GET
request that requires a specific Response.
We can handle this though, by using the respondWith
option. This allows us to define a function that will be called immediately when a Request is received. The filter ensures we only receive GET
requests with a specific query parameter. Then in the handler
we response appropriately if the hub.verify_token
matches our secret.