KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

HTTP Request & Telegram

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
LANTONIO



Joined: 24 Apr 2019
Posts: 13

PostPosted: Thu Nov 28, 2019 8:15 am    Post subject: HTTP Request & Telegram Reply with quote

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
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Thu Nov 28, 2019 12:58 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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

KS-Soft Forum Index