Created
April 11, 2018 11:49
-
-
Save thermatk/7f87c173ba80bcb6efd0fca1bb420520 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim objRequest As Object | |
Dim strChatId As String | |
Dim strMessage As String | |
Dim strPostData As String | |
Dim strResponse As String | |
strChatId = "chatid" | |
strMessage = "HelloWorld" | |
strPostData = "chat_id=" & strChatId & "&text=" & strMessage | |
Set objRequest = CreateObject("MSXML2.XMLHTTP") | |
With objRequest | |
.Open "POST", "https://api.telegram.org/bot448817313:AAEwx3JKqx7ORbyUxlWMlYRzZUXxSeF_dhA/sendMessage?", False | |
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" | |
.send (strPostData) | |
GetSessionId = .responseText | |
MsgBox GetSessionId | |
End With |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@BotFather
https://api.telegram.org/bot<token>/getUpdates
https://api.telegram.org/bot<token>/getMe