JavaScript

Introduction

In this tutorial, you will learn how to create a webhook to receive events from calls. Using webhooks will allow you to create a unique realtime call applications to build products your users will love.

When a call is made or received, the webhooks API allows you to monitor active calls. The webhook will return the following information:

When the status of the call changes, a new payload will be sent to the webhook:

  • When the call begins, you will receive a payload with the state as RINGING.
  • When the call is answered, you will receive a payload with the state as ACTIVE.
  • When the call ends, you will receive a payload with the state as ANSWERED.
  • If the call is not picked up, you will receive a payload with the state as MISSED.

For more information about the payload in a webhook, please refer to the webhooks documentation.

Receiving call events using webhooks

Create a webhook to receive events from calls

Available on:
JavaScript Python
Steps
1
Introduction to this task
2
Prerequisites
3
Create a webhook
4
Create a local server
5
Create a webhook
6
Cleanup
7
What's next?