A
A
Alex Devera2021-03-05 01:16:27
API
Alex Devera, 2021-03-05 01:16:27

I'm trying to write Mikrotik alerts on Telegram. Unable to send get requests. What am I doing wrong?

Hello colleagues and sympathizers. I ask you not to pour mud heavily, but I really do not understand what is going wrong.
I want to write simple notifications from Mikrotik to a cart (Netwatch + cart).
I launched the bot, everything leaves the browser - there are no problems.
Nothing works with Mikrotik.
By the way, I did everything according to this instruction
Essence:
I try to do everything in the terminal:

/tool fetch url="https://api.telegram.org/<Bot_Id>/sendMessage\?chat_id=111111&text=Testing"

To which the terminal replies:
failure: unable to resolve hostname
I'm not really a "PC user" and I understand that Mikrotik cannot reach the host. But the trace from the same microcurrent says that the host is available. What is wrong - I do not understand.
PS: I also don't understand why "URL" is used and not "http-data". Like he sends POST and GET requests.
Thank you in advance for your response.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nikadim Tsatskin, 2021-03-05
@BigDrive

Judging by the error, he cannot resolve the address, check the DNS settings on Mikrotik, and ping api.telegram.org from the device itself

A
Alex Devera, 2021-03-07
@Dragon_Alex_Devera

In general, I figured it out myself, the problem, as always, turned out to be in the simplest, namely, incorrectly configured firewall rules. The permissive rule was lower than the prohibitive one. A lesson to yourself, and a reminder to others, check your firewall. I think it's not worth putting as an answer, because he himself is a fool :)

P
paxlo, 2021-03-05
@paxlo

/ip dns
set servers=1.1.1.1,1.0.0.1
cache flush

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question