Skip to content

Instantly share code, notes, and snippets.

@amorev
Last active Dec 13, 2020
Embed
What would you like to do?
Sending file via Telegram from terminal
#!/bin/sh
chatId=<YOUR_CHAT_ID>
botToken=<YOUR_BOT_TOKEN>
curdir=$PWD
echo sending $curdir/$1
curl -F chat_id=$chatId -F document=@$curdir/$1 https://api.telegram.org/bot$botToken/sendDocument
# more about gist on my site — amorev.ru/telegram-terminal-file-send
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment