Skip to content

Instantly share code, notes, and snippets.

@g3rhard
Created December 8, 2016 03:49
Show Gist options
  • Save g3rhard/d2068fe42e3757cf458c4939f9c6d62f to your computer and use it in GitHub Desktop.
Save g3rhard/d2068fe42e3757cf458c4939f9c6d62f to your computer and use it in GitHub Desktop.
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})
@g3rhard
Copy link
Author

g3rhard commented Dec 8, 2016

Powershell script to send message in Telegram with Telegram Bot API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment