-
-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Telegram integration without webhook but with chat-id #689
Comments
The problem is that sending and receiving the "/start" command requires the Healthchecks instance to be at least partially open to the world, right? One workaround you can use right now is to create the Telegram integration manually from admin. Put the bot token in the The value of the |
Mh, I might be wrong but I think you don't need the start command at all if the bot is invited to the group and is able to read messages from there that ar not commands (seperate bot setting). The only "problem" then is to find out the chat id by yourself because otherwise you would need to call getUpdates from within healthchecks to automate this too. Thank you for your workaround. I'll look into this. |
Workaround works :) Can you name a dedicated command to realize the same? So I can add it to my IaC Runbook (Ansible). |
There currently isn't a command or API call to automate this. |
PS. Except for running a SQL INSERT query, which would be even more of a workaround :-) |
Ok. I thought of something like this which I use to pre-install an admin user to my derived image:
|
Can we add this as alternative to the Telegram integration setup? When clicking to add the integration that it gives the option to provide the chat-id instead? |
The thing is, to avoid spam, a bot can't talk to a user directly. The user has to initiate the conversation. That is talk first, send the first message. Hense the usage of "/start" in the onboarding of tg integration of HC. |
The /start thing is okay so far. But the Webhook thing should not be the only option to setup Telegram. As mentioned, providing a chat id is all it takes to set up HC <-> Telegram. If someone (like me) would like to set this up without the webhook it is still no problem. Create a group, invite the bot, text around including the /start command, use the bot API to find out the chat id and provide it to HC. That is a bit more manual but does not require webhooks. |
I'm not planning to work on this myself, but would accept a PR. |
There's an easy workaround for this issue - simply use ... a webhook to Telegram API. 1. Create your bot by messaging @BotFather
2. Get
3. Configure HealthChecks
|
In addition to the above, you can also add Ex:
All available parameters are here: https://core.telegram.org/bots/api#sendmessage |
Hi, I like the selfhosted version of healthchecks. But I don't want a public availability to use the Telegram integration (webhook). It would be so much easier if one could only provide the bot token and an chat id as the target. Uptime Kuma for example does it exactly this way. Healthchecks would then need to call the API endpoint https://core.telegram.org/bots/api#sendmessage with the given data.
The text was updated successfully, but these errors were encountered: