<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://coolscript.net/index.php?action=history&amp;feed=atom&amp;title=Send_messages_to_Telegram_using_curl</id>
	<title>Send messages to Telegram using curl - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://coolscript.net/index.php?action=history&amp;feed=atom&amp;title=Send_messages_to_Telegram_using_curl"/>
	<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Send_messages_to_Telegram_using_curl&amp;action=history"/>
	<updated>2026-06-02T18:20:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://coolscript.net/index.php?title=Send_messages_to_Telegram_using_curl&amp;diff=767&amp;oldid=prev</id>
		<title>Admin: Created page with &quot; The following samples shows how to send messages to Telegram using curl.&lt;br&gt; To be short, this is working with an existing account, no need to add two account for doing this....&quot;</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Send_messages_to_Telegram_using_curl&amp;diff=767&amp;oldid=prev"/>
		<updated>2022-05-26T19:46:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; The following samples shows how to send messages to Telegram using curl.&amp;lt;br&amp;gt; To be short, this is working with an existing account, no need to add two account for doing this....&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
The following samples shows how to send messages to Telegram using curl.&amp;lt;br&amp;gt;&lt;br /&gt;
To be short, this is working with an existing account, no need to add two account for doing this.&amp;lt;br&amp;gt;&lt;br /&gt;
To setup you first create a bot, then a channel and then obtaining the required ID&amp;#039;s for curl.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Add a new bot=&lt;br /&gt;
*Search for @BotFather and click start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:final-bot01.png|640px]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Type &amp;#039;&amp;#039;&amp;#039;/newbot&amp;#039;&amp;#039;&amp;#039; to add a new bot&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:final-bot02.png|640px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Enter the name of the new bot&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:final-bot03.png|640px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Save the API Key&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:final-bot04.png|640px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Add a new channel=&lt;br /&gt;
&lt;br /&gt;
*Goto the Menu&lt;br /&gt;
[[image:final-bot04A.png|320px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Create a new channel&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:final-bot05.png|640px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Make the channel private&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:final-bot06.png|640px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Choose &amp;#039;&amp;#039;&amp;#039;Add user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
[[image:final-bot07.png|640px]]&lt;br /&gt;
&lt;br /&gt;
*Add the bot user&lt;br /&gt;
[[image:final-bot08.png|640px]]&lt;br /&gt;
&lt;br /&gt;
*Adjust the permissions to your needs&lt;br /&gt;
[[image:final-bot09.png|640px]]&lt;br /&gt;
&lt;br /&gt;
=Obtaining the chat id=&lt;br /&gt;
&lt;br /&gt;
*Send test message&lt;br /&gt;
[[image:final-bot10.png|640px|]]&lt;br /&gt;
&lt;br /&gt;
*Get the chat ID by using the following URL:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;https://api.telegram.org/bot&amp;lt;BOT-ID&amp;gt;/getUpdates&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:final-bot11.png|640px|]]&lt;br /&gt;
&lt;br /&gt;
=Sending messages using curl=&lt;br /&gt;
Before you send messages make sure that you&amp;#039;ve added all participants to the channel.&lt;br /&gt;
*Curl&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;curl &amp;#039;https://api.telegram.org/bot&amp;lt;BOT-ID/sendMessage?chat_id=-&amp;lt;CHAT-ID&amp;gt;&amp;amp;text=Message Text&amp;#039;&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>