Overview
Webhooks allow you to receive real-time notifications about events happening within the Plaud ecosystem, such as when a transcription is completed or a new file is uploaded. Instead of continuously polling the API for status changes, you can subscribe to events. This is particularly useful for long-running transcription and extraction jobs. When an event happen, Plaud will send a POST request to your specified webhook URL with the relevant results.Using Webhooks
1
1. Create a webhook endpoint
First, create a webhook in the Plaud Developer Portal. Navigate to your event subscribe and click “Add Subscription”.
You will need to configure the following:
- Name: A descriptive name for your webhook
- Callback URL: Your publicly accessible HTTPS endpoint
- Events to subscribe: Select the specific events you want to receive notifications for.
2
2. Implement and Verify Your Endpoint
Here is an example of how to implement a webhook endpoint using Python and Flask. This is a complete, runnable example that includes signature verification.
Python
Security Considerations
- HTTPS Requirement: Your webhook endpoint URL must use HTTPS to ensure data is encrypted in transit.
- Signature Verification: As detailed above, always verify the signature of incoming requests.
- Idempotency: Your endpoint might receive the same event more than once. Design your event processing to be idempotent to prevent duplicate processing.