|
View previous topic :: View next topic |
Author |
Message |
LANTONIO
Joined: 24 Apr 2019 Posts: 13
|
Posted: Thu Nov 28, 2019 8:15 am Post subject: HTTP Request & Telegram |
|
|
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 |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Thu Nov 28, 2019 12:58 pm Post subject: |
|
|
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: | 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 |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|