How to Test Telegram Webhooks
Telegram bots use webhooks to receive real-time updates for messages, callback queries, and inline interactions from chats.
Telegram Official Webhook Docs1. Telegram Webhook Events
Telegram can send the following webhook events to your endpoint:
messageedited_messagecallback_queryinline_querychosen_inline_resultchat_join_request2. Set Up a Test Endpoint with HookRay
Follow these steps to start receiving Telegram webhooks for testing:
- Go to HookRay and click "Start Testing — Free" to get your unique webhook URL.
- Copy the URL (e.g.,
https://h.hookray.com/abc123). - In your Telegram dashboard, navigate to the webhook settings and paste the HookRay URL as your endpoint.
- Select the events you want to receive (see list above).
- Trigger a test event — HookRay will show the incoming webhook in real-time.
3. Sample Telegram Webhook Payload
Here's an example of what a Telegram webhook payload looks like:
{
"update_id": 982374651,
"callback_query": {
"id": "349857239847523984",
"from": {
"id": 5544332211,
"first_name": "Kai"
},
"data": "confirm_order:1827"
},
"message": {
"message_id": 241,
"chat": {
"id": -1001234567890,
"title": "HookRay Alerts"
}
}
}4. Common Issues & Troubleshooting
Webhook not arriving?
Check that your endpoint URL is correct and publicly accessible. Telegram cannot reach localhost URLs — use HookRay's cloud URL instead.
Getting 400 or 500 errors?
HookRay accepts any payload and returns 200 OK by default, so the issue is likely on Telegram's side. Check your webhook configuration and event selection.
Need to verify webhook signatures?
Telegram signs webhook requests for security. Use HookRay to capture the raw headers and body, then implement signature verification in your application code.
5. Next Steps
- Use HookRay's webhook replay feature to re-send captured webhooks while building your handler
- Enable smart parsing (Pro plan) to see Telegram-specific fields highlighted automatically
- Check the Telegram webhook documentation for the complete event reference
Ready to test Telegram webhooks?
Get a free webhook URL in 5 seconds. No signup required.
Start Testing Telegram Webhooks — Free