Telegram Bot Webhook HTTPS with AgentDomains
Call Telegram’s setWebhook API with https://tg-helper.makes.fyi/bot backed by trusted Cloudflare edge TLS on port 443.
Telegram only sends webhooks to trusted HTTPS endpoints on standard ports. set_proxy meets every rule in one call.
1. 3-Stage Sequence Diagram
3-stage sequence: AI agent claims tg-helper.makes.fyi, maps it to tg-helper.up.railway.app, and verifies HTTPS 200 OK.
2. 4-Step MCP Tool-Call Transcript
Your agent sends these exact calls to https://mcp.agentdomains.co or local stdio.
{
"tool": "check_availability",
"arguments": {
"label": "tg-helper",
"domain": "makes.fyi"
}
}
// Response:
{
"fqdn": "tg-helper.makes.fyi",
"available": true,
"reason": "available"
}
{
"tool": "claim_domain",
"arguments": {
"label": "tg-helper",
"domain": "makes.fyi",
"email": "ops@example.com"
}
}
// Response:
{
"fqdn": "tg-helper.makes.fyi",
"status": "claimed",
"confirm_within_days": 30
}
{
"tool": "set_proxy",
"arguments": {
"label": "tg-helper",
"domain": "makes.fyi",
"origin": "tg-helper.up.railway.app"
}
}
// Response:
{
"ok": true,
"fqdn": "tg-helper.makes.fyi",
"origin": "tg-helper.up.railway.app",
"https": "https://tg-helper.makes.fyi"
}
curl -fsSI https://tg-helper.makes.fyi
# HTTP/2 200
# content-type: application/json
# strict-transport-security: max-age=31536000
3. Clean Teardown (GitHub Action & CLI)
Call Telegram deleteWebhook before deleting the subdomain. Delete the DNS mapping before you destroy your cloud server to block dangling takeovers.
name: Teardown tg-helper
on:
workflow_dispatch:
pull_request:
types: [closed]
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Delete AgentDomains hostname before destroying compute
env:
AGENTDOMAINS_API_KEY: ${{ secrets.AGENTDOMAINS_API_KEY }}
run: |
curl -fsSL -X DELETE \
-H "Authorization: Bearer $AGENTDOMAINS_API_KEY" \
"https://api.agentdomains.co/v1/subdomains/tg-helper"
# Or with the Go CLI:
# agentdomains delete tg-helper
More Workflow Blueprints
Slack App Events & Slash Commands
Configure Slack Event Subscriptions, Interactivity, and Slash Command request URLs on a stable HTTPS hostname.
MessagingWhatsApp Cloud API Webhooks
Verify Meta’s WhatsApp Business Cloud API webhook challenge over trusted HTTPS without wrestling with Nginx cert chains.
CI / CDCI/CD Branch Preview Domains
Provision deterministic per-branch URLs (feat-auth.makes.fyi) directly from GitHub Actions or GitLab CI using the AgentDomains Go CLI.
iOS & Android Backend Dev URLs
Pass iOS ATS and Android TLS rules with a real HTTPS API domain during mobile builds.
Claim your agent domain now
Start with 10 free HTTPS domains under agentdomains.co or makes.fyi for 30 days. Upgrade to Pro for $10/year to keep up to 100 names with visitor stats.