# \[APP\]\[Pro\] Telegram Bot v2.0.0

**URL:** <https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243>\
**Category:** Apps\
**Tags:** app, homey-pro\
**Created:** [December 28, 2022, 3:58pm UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243 "2022-12-28T15:58:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jorden/32/8856_2.png) [@Jorden](https://community.homey.app/u/Jorden)\
**Post date:** [December 28, 2022, 3:58pm UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/1 "2022-12-28T15:58:59Z")

</div>

I am working on the Telegram Bot app, to make it ready for the new Homey and up2date on Homey SDK3.

There are some changes that might be ‘breaking’:

**The Homey speech output functionality will be removed** (thus, command ‘/say’ will no longer work)

**There will be no longer a ‘shared’ bot** (the @athomhomey\_bot Telegram bot). The app will require you to set up your own custom bot, which was optional before.  
People using the shared bot can already set up a custom bot in the current app to prevent breaking the app in your setup. Please do so, delete your connected users afterwards and re-register them.  
This is a more secure way, everybody has their own Telegram Bot of which the credentials are saved on your Homey, which means nobody can abuse the bot.

The new version will be released in the coming days.

---

<div class="post-metadata">

**Author:** ![itshows](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/itshows/32/9204_2.png) [@itshows](https://community.homey.app/u/itshows)\
**Post date:** [January 30, 2023, 9:32am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/2 "2023-01-30T09:32:47Z")

</div>

Hi Jordan, since the last update, the following code doen not work anymore.  
What has changed for this to not work.  
Great app by the way, use a lot for logging.

async function sendMessage(message) {  
let appId = “org.telegram.api.bot”;  
let telegram = await Homey.apps.getApp({ id: appId });  
let settings = await Homey.apps.getAppSettings({ id: appId });  
let chatId = settings.chat\_ids[0].chat\_id;  
return await telegram.apiGet(“/send\_message/”, { to: chatId, text: message });  
}

---

<div class="post-metadata">

**Author:** ![itshows](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/itshows/32/9204_2.png) [@itshows](https://community.homey.app/u/itshows)\
**Post date:** [January 30, 2023, 9:33am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/3 "2023-01-30T09:33:45Z")

</div>

sorry for the misspelled name Jorden.

---

<div class="post-metadata">

**Author:** ![itshows](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/itshows/32/9204_2.png) [@itshows](https://community.homey.app/u/itshows)\
**Post date:** [January 30, 2023, 9:56am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/4 "2023-01-30T09:56:39Z")

</div>

i use this javascript code in homeyscript

---

<div class="post-metadata">

**Author:** ![Jorden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jorden/32/8856_2.png) [@Jorden](https://community.homey.app/u/Jorden)\
**Post date:** [January 30, 2023, 9:58am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/5 "2023-01-30T09:58:47Z")

</div>

> [@itshows](#):
>
> /send\_message/

Can you try with /send\_message instead of /send\_message/ (last slash removed)?

If that doesn’t work, I will dive into it.

---

<div class="post-metadata">

**Author:** ![itshows](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/itshows/32/9204_2.png) [@itshows](https://community.homey.app/u/itshows)\
**Post date:** [January 30, 2023, 11:26am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/6 "2023-01-30T11:26:47Z")

</div>

tried it, does not work.

---

<div class="post-metadata">

**Author:** ![Fac3](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fac3/32/4550_2.png) [@Fac3](https://community.homey.app/u/Fac3)\
**Post date:** [March 26, 2023, 9:47am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/7 "2023-03-26T09:47:54Z")

</div>

Hi @Jorden !

I’ve just got my new Pro (early 23) and testing your app with the latest version. I experience that snapshot/image sending does not work, while it works on the previous (early 19) Pro.

---

<div class="post-metadata">

**Author:** ![Roco72](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/roco72/32/6027_2.png) [@Roco72](https://community.homey.app/u/Roco72)\
**Post date:** [April 1, 2023, 7:58am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/8 "2023-04-01T07:58:27Z")

</div>

Hi Jordan: Is it possible to send self-destructive messages using the app? If not, consider this a feature request 😉

---

<div class="post-metadata">

**Author:** ![Jorden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jorden/32/8856_2.png) [@Jorden](https://community.homey.app/u/Jorden)\
**Post date:** [April 3, 2023, 11:46am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/9 "2023-04-03T11:46:58Z")

</div>

I heard this twice. Sadly cannot test this yet as I have yet to order a Homey pro. I will try and see if I can setup a logging function for the images soon. However, since I’m very busy, this might take a while ☹

---

<div class="post-metadata">

**Author:** ![Jorden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jorden/32/8856_2.png) [@Jorden](https://community.homey.app/u/Jorden)\
**Post date:** [April 3, 2023, 11:48am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/10 "2023-04-03T11:48:23Z")

</div>

It is not possible currently. Also don’t know if Telegram supports that? Can’t seem to find anything in the documentation: [Telegram Bot API](https://core.telegram.org/bots/api#sendmessage)

Ofcourse it would be possible to send it and delete it after a few seconds. However I don’t think thats a good idea, I don’t know if I can see if the message is read etc.

---

<div class="post-metadata">

**Author:** ![Roco72](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/roco72/32/6027_2.png) [@Roco72](https://community.homey.app/u/Roco72)\
**Post date:** [April 4, 2023, 7:31am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/11 "2023-04-04T07:31:44Z")

</div>

> [@Jorden](#):
>
> It is not possible currently. Also don’t know if Telegram supports that? Can’t seem to find anything in the documentation: [Telegram Bot API](https://core.telegram.org/bots/api#sendmessage)

I think you should be the judge on whether secret chats featuring self-destructive messages, can be implemented in a bot ([End-to-End Encryption, Secret Chats](https://core.telegram.org/api/end-to-end))

If it is, then the next question pops up:  
Is it possible for a bot running over a secret chat to make the messages self-destructive on a per-message basis, and if not, it might be useful to create multiple (two) bots, one secret and one with messages to self-destruct, and one with “normal” messages.

Maybe this is possible by creating devices on a per-chatbot bases, although I realize this would take serious effort in refactoring code…

This might also be useful in a use case where one bot is for logging, and the other one for “real” interaction with Homey, which addresses your next remark:

> [@Jorden](#):
>
> Ofcourse it would be possible to send it and delete it after a few seconds. However I don’t think thats a good idea, I don’t know if I can see if the message is read etc.

---

<div class="post-metadata">

**Author:** ![Twan\_Veugelers](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/twan_veugelers/32/129333_2.png) [@Twan\_Veugelers](https://community.homey.app/u/Twan_Veugelers)\
**Post date:** [April 4, 2023, 1:36pm UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/12 "2023-04-04T13:36:14Z")

</div>

Hi @Roco72 .

Have you looked at the ‘Other’ [Telegram](https://homey.app/nl-nl/app/com.spkes.telegramNotifications/Telegram/) app?

It contains flow steps to remove specific messages:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/b/dbb10d655e9eb6f9f5592086d0f41712fd335140.png)

---

<div class="post-metadata">

**Author:** ![Chris\_nl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/chris_nl/32/27194_2.png) [@Chris\_nl](https://community.homey.app/u/Chris_nl)\
**Post date:** [April 11, 2023, 9:39am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/13 "2023-04-11T09:39:47Z")

</div>

Images do seem to work on my 2019, but for some reason images that I send with the “image grabber” app won’t work. This used to work in the previous version, with no changes made to the flows etc.

If i add another card to this flow with push notification the image is being sent through push notification, so the issue seems to be in the Telegram Bot app. If you need any more information, please let me know.

UPDATE:  
I use the flow below, when I pick another image from the list it does work, so the problem is only with the image from “this flow”.

 ![telegram_bot](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/6/a697ac5a27094381868612f2bc0e5e4c4c47919a.png)

---

<div class="post-metadata">

**Author:** ![Twan\_Veugelers](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/twan_veugelers/32/129333_2.png) [@Twan\_Veugelers](https://community.homey.app/u/Twan_Veugelers)\
**Post date:** [April 11, 2023, 1:45pm UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/14 "2023-04-11T13:45:18Z")

</div>

Hi @Chris_nl.

Have you tried the ‘other’ Telegram app, that works perfectly with images:

> **[Telegram](https://homey.app/nl-nl/app/com.spkes.telegramNotifications/Telegram/)**
>
> Bedien uw slimme huis gemakkelijk met Telegram

---

<div class="post-metadata">

**Author:** ![Chris\_nl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/chris_nl/32/27194_2.png) [@Chris\_nl](https://community.homey.app/u/Chris_nl)\
**Post date:** [April 11, 2023, 2:10pm UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/15 "2023-04-11T14:10:10Z")

</div>

Nope, but this app works fine and has always worked with this option too, so probably just a small bug somewhere. (and if i’m correct the image grabber app is from the same developer as this Telegram Bot app, so i hope for a fast solution.

@Twan_Veugelers, why is the other app better in your opinion?

---

<div class="post-metadata">

**Author:** ![Twan\_Veugelers](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/twan_veugelers/32/129333_2.png) [@Twan\_Veugelers](https://community.homey.app/u/Twan_Veugelers)\
**Post date:** [April 12, 2023, 9:37am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/16 "2023-04-12T09:37:28Z")

</div>

Just look at the options it provides.

---

<div class="post-metadata">

**Author:** ![Felho](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/felho/32/38916_2.png) [@Felho](https://community.homey.app/u/Felho)\
**Post date:** [May 11, 2023, 5:49am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/17 "2023-05-11T05:49:54Z")

</div>

not work app for me. If I reinstall how can set my private bot?

---

<div class="post-metadata">

**Author:** ![Jorden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jorden/32/8856_2.png) [@Jorden](https://community.homey.app/u/Jorden)\
**Post date:** [May 16, 2023, 11:51am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/18 "2023-05-16T11:51:00Z")

</div>

In the settings you can follow the steps to setup a private bot.

---

<div class="post-metadata">

**Author:** ![ErtjeTheFreeze](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ertjethefreeze/32/77370_2.png) [@ErtjeTheFreeze](https://community.homey.app/u/ErtjeTheFreeze)\
**Post date:** [July 8, 2023, 6:14pm UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/19 "2023-07-08T18:14:56Z")

</div>

Hi Jordan,  
I have an issue with the _ **names** _ the app presents when using the Send Message Flow Card.  
I did a /register xxxx both from my personal Telegram account as from a Telegram group. In both cases I got the confirmation that Homey was successfully connected.  
However when I now use the Send Message Flow Chard, it presents me 2 accounts to choose from, but both have exactly the sane name: my name. I’ve tested choosing both entries and it sends correctly to me or the group. The ONLY issue is the names that are presented: it doesn’t show me the group name, so I don’t know which entry to select.  
Please advise (Homey 2019 PRO, App v1.0.1)  
Greetings,  
Rene

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/b/6b9b333357b7a64bbae5de6e6f3244a85d2ca0b3.png)

---

<div class="post-metadata">

**Author:** ![Jorden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jorden/32/8856_2.png) [@Jorden](https://community.homey.app/u/Jorden)\
**Post date:** [July 10, 2023, 9:00am UTC](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243/20 "2023-07-10T09:00:52Z")

</div>

I am not sure if I can see from the API call, if it is a group or a one-person-chat. If there is no way, I can only give back the chat ID as stated on the settings page. This would require an update.

I am very short on free time to experiment with seeing how the group / single person chat is coming in…

[Next page](https://community.homey.app/t/app-pro-telegram-bot-v2-0-0/74243.md?page=2)
