Webhook for Telegram doesn't work


I can`t configure Telegram Webhook.

My steps:

  1. Create Bot via botfather, got botID on email

  2. Got chat ID via special bots.

  3. Go to http://localhost:3000/admin/hooks create Telegram WebHook:
    Set up bot token:
    Chat ID:
    All Events

4. Test: Created Task, Edited task - no messages
Also recent Deliveries are empty

  1. But working via this response in browser.


Please report on github if it’s a bug.

I am using Telegram with Gitea without any problems.

Try removing the minus sign ‘-’ from your chat_id in the webhook.

I got my chat id from ‘Telegram Bot Raw’

Hm, checked with and without ‘-’. Nothing.

Which gitea version are you using?
Should task updates be in chat?
Have you installed additional packages for work with tihs feature?

My workflow:

  1. Created TG chat
  2. User1 created task
  3. User2 commented task
  4. Telegram chat should recieve a new update.

I am using 1.14.3 on FreeBSD 12.2
When I set up my Telegram notification it was on ‘All Events’. It was too noisy for me so now I have it on custom events with only a few events of interest.
The only weird thing I have noticed is that I get two identical messages one after the other on push events.

Telegram must be able to see the URL. If the URL is localhost then telegram will drop the webhook.

Thanks, but should be gitea visible from internet?
I thought it work so:

  1. I do some actions
  2. Gitea makes request via curl (for example)
  3. #curl -X POST
    -H ‘Content-Type: application/json’
    -d ‘{“chat_id”: “123456789”, “text”: “This is a test from curl”, “disable_notification”: false}’

Why Telegram should be able to see my server? I did it successfully from bash from my server which located over NAT.

The links included in the message (eg. localhost) need to be seen by telegram, and since localhost is a special host, they can’t fetch it.

Your test message didn’t have any special URL like that.