Webhook
Send live events to any external service via HTTP requests
Webhook integration lets GEMTOK send live events to any external service via HTTP requests. Connect your stream to Discord, custom servers, automation tools, and more.
What is Webhook?
A Webhook is an HTTP request that GEMTOK sends when a Trigger fires. It can be:
- GET or POST request
- To any URL you control
- With custom body
- Containing live event data via variables
Use cases:
- Log all gifts to your own database
- Trigger IFTTT, Zapier, Make.com automation
- Control smart home devices via HTTP API
- Update your website live stats
How Webhook Works
Example:
- Viewer sends Rose
- Trigger fires
- Webhook Action sends POST to
https://your-server.com/api/giftwith JSON - Your server saves to DB
How to Create Webhook Action
- Go to Stream Studio ? Integration ? Webhook
- Configure:
HTTP Address (URL)
- Your endpoint URL: e.g.,
https://discord.com/api/webhooks/xxx/yyyorhttps://your-server.com/webhook - Must be HTTPS for security (HTTP may be blocked)
- Can include query params
HTTP Method
- POST (recommended) - Send data in body
- GET - Send data in URL params
Content Type
- application/json (recommended) - Most APIs expect JSON
- application/x-www-form-urlencoded - For form data
- text/plain - Raw text
Best Practices
- Use HTTPS: Always HTTPS, not HTTP, for security
- Validate: Your endpoint should validate payload and ignore invalid requests
- Handle retries: GEMTOK may retry if your server fails - make endpoint idempotent
- Log: Log incoming webhooks for debugging
- Rate limit: If you expect many events, ensure your server can handle rate
Webhook sends data to external URL you control. GEMTOK is not responsible for what happens after request leaves GEMTOK. Ensure your endpoint is secure and you trust the service.
Troubleshooting
- Not receiving?
- Check URL correct and HTTPS
- Test with https://webhook.site first
- Check your server logs
- Check firewall not blocking
- Ensure Trigger actually fires (check Trigger logs)
- 400/500 error?
- Check JSON valid (use jsonlint.com)
- Check Content-Type matches body
- Check your server expects correct format
- Discord not showing?
- Discord webhook expects specific JSON format - check Discord docs
- Ensure
contentorembedsfield present - Check webhook URL not expired
Related: Actions to create webhook actions, Triggers to fire them.