Community discussions

MikroTik App
 
User avatar
JKQ
just joined
Topic Author
Posts: 1
Joined: Mon Jun 22, 2020 8:20 am
Location: Russia

Telegram notification

Mon Jun 22, 2020 9:01 am

Hello. I have long wanted to make notifications via Telegram. Finally Telegram was unlocked in Russia and I decided to try it.

For the test, I created a task in the scheduler, but the notification does not come.
/tool fetch url=”https://api.telegram.org/botХХХХХХХХХХХХХХ/sendMessage?chat_id=-XXXXX&text=test in "
When I run the command in the terminal, then messages are sent.
/tool fetch url=”https://api.telegram.org/botХХХХХХХХХХХХХХ/sendMessage\?chat_id=-XXXXX&text=test in terminalt"
Tell me what could be the problem (RouterOS v6.41.1)?
Maybe the problem is in the firewall? But I have no rules in the output chain.
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1090
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: Telegram notification

Tue Jun 23, 2020 2:56 pm

Possibly missing the escape for question mark?
 
Sarel0092
newbie
Posts: 48
Joined: Tue Aug 07, 2018 8:25 am

Re: Telegram notification

Tue Jun 23, 2020 4:31 pm

I use the following to send notifications via Telegram in a script:
/tool fetch url="https://api.telegram.org/botxxxxxxxx/sendMessage\?chat_id=-xxxx&text=Test" keep-result=no;
Edit:
Used with version 6.46.6.
 
knedlyk
just joined
Posts: 10
Joined: Sat Jul 18, 2020 4:18 pm

Re: how to send Notifications via Pushover & Pushbullet

Sat Jul 18, 2020 9:43 pm

You may also use Pushbullet:

/tool fetch mode=https url="https://api.pushbullet.com/v2/pushes " http-method=post http-data="type=note&body=some text" user="API-Token"

On a specific device:

/tool fetch mode=https url="https://api.pushbullet.com/v2/pushes" http-method=post http-data="device_iden=<device_id>&type=note&body=some text" user="API-Token"

Who is online

Users browsing this forum: No registered users and 7 guests