After creating a telegram bot and gain bot token, I want to send a request to the bot API.
This link says we must send the HTTP request like this:
https://api.telegram.org/bot<token>/METHOD_NAME
and brings example for easiest method "getme" which has not any input parameters.
Imagine I want to send some messages. I should use the sendMessage
method which has two Required input parameters: chat_ID and text.
Now my Questions begins:
How can I write this sendMessage method in above request format with its parameters? I tried
sendMessage(param1,param2)
and received method not found message.What is
chat_id
? if I want to send a message to the contact, how can I know hischat_id
?
I searched a lot on the internet, there are plenty of projects on GitHub especially for this purpose, and honestly none of them makes any sense. for god's sake someone please help me. I am loosing way.
Regards.