HTTP Request & Telegram

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
LANTONIO
Posts: 13
Joined: Wed Apr 24, 2019 3:09 am

HTTP Request & Telegram

Post by LANTONIO »

Hi,
I need to send a message via telegram API and HTTP Request action, I try to configure my HostMonitor v11.74 like this:
---
Host: https://api.telegram.org
Port: 443
Request:
POST https://api.telegram.org/botxxxxx/sendMessage HTTP/1.1
Host: api.telegram.org
Content-Type: application/json
{"chat_id": "-XXXXXXXX",
"text": "TEST KO"}
----
but it doesn't work and I can't update my application to the new one (v11.98/99beta) yet.

Have I miss something?

Thanks
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

New Telegram action (version 11.99) works fine.

I think you missed empty line in request (after header), also you may add charset, e.g.

Code: Select all

POST https://api.telegram.org/botxxxxx/sendMessage HTTP/1.1
Host: api.telegram.org
Content-Type: application/json; charset=UTF-8

{"chat_id": "-XXXXXXXX", "text": "TEST KO"} 
Regards
Alex
Post Reply