Created
December 8, 2016 03:49
-
-
Save g3rhard/d2068fe42e3757cf458c4939f9c6d62f 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
param( | |
[string]$id, | |
[string]$message | |
) | |
$bot_token = "token" | |
$uri = "https://api.telegram.org/bot$bot_token/sendMessage" | |
Invoke-WebRequest -Method Post -Uri $uri -ContentType "application/json;charset=utf-8" -Body (ConvertTo-Json -Compress -InputObject @{chat_id=$id; text=$message}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Powershell script to send message in Telegram with Telegram Bot API