Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Added clarity for webhooks #372

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions docs/guides/capabilities/webhooks/webhooks-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ description: >-

# Webhooks Overview

Webhooks are
[HTTP-based](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) callback
functions that can be defined by the user to allow lightweight, event-driven
communication between two APIs.
Webhooks are a powerful way for web applications to communicate with each other in real-time. They enable one application to send automated messages or data to another application when a specific event occurs. This mechanism is widely used for various integrations. Webhooks are efficient because they push updates immediately, eliminating the need for constant polling, and promoting event-driven architectural style.

Setting up a webhook involves the following steps:

1. The client provides a unique URL to the server API and specifies which event
it wanted to be notified about.
it wants to be notified about.
2. Once the webhook is configured, the server automatically sends the relevant
payload to the client's webhook URL when the specified event occurs.

Expand All @@ -29,15 +26,15 @@ A webhook enables Dyte to push real-time updates to your applications. When the
event occurs, Dyte makes an HTTP request (usually a POST) to the URL you
configured for the webhook and sends the updates to your application as a JSON
payload. You can then use these events to perform actions in your backend
systems. To learn more, see Dyte webhook events overview.
systems. Check out the list of events Dyte supports on [Webhook Events](/guides/capabilities/webhooks/webhook-events) page.

Webhooks are particularly useful for asynchronous events, such as when a
recording is uploaded or when a participant joins the meeting.

Let's say you have a meeting that you want to record. You have registered to
receive the `meeting.started` and `meeting.ended` event. A webhook notifies your
receive the `meeting.started` and `meeting.ended` events. A webhook notifies your
app when the meeting starts and when it ends. After your webhook endpoint
receives the meeting.started event, your webhook function can then run backend
receives the `meeting.started` event, your webhook function can run backend
actions to start recording the meeting and end the recording of the meeting when
`meeting.ended` event is received.

Expand Down Expand Up @@ -70,7 +67,7 @@ The following headers are of more importance for your security and reliability:

### Payload

Payload contains information about the event that triggered the webhook, such as user data or a change in state.
The payload contains information about the event that triggered the webhook, such as user data or a state change.

For example,

Expand All @@ -82,6 +79,14 @@ For example,
}
```

### Developing and Testing Webhooks

Developing and testing webhooks can be time-consuming, especially during the development phase when your webhook API is under construction. You can use [Beeceptor](https://beeceptor.com/webhook-integration/?utm_source=social&utm_campaign=dyte-io), a tool that can significantly fast-track your webhook development by providing features like mock-endpoints and local-tunnels. Here is how:

* **HTTP Mock endpoint**: Using an HTTPS mock endpoint you can simulate the behavior of real webhook consumers. Use this to discover various events and respective payloads.
* **Local tunnel**: Local tunnels provide a secure public HTTPs endpoint that exposes a local web service running on your localhost. This eliminates the complexity of roundtrip deployments when developing webhooks, and enables faster integration.


<head>
<title>Webhooks Overview Guide</title>
<meta name="description" content="Get an overview of webhooks and their functionality in Dyte's capabilities. Follow our guide for a comprehensive understanding."/>
Expand Down