Created
September 20, 2019 13:45
-
-
Save grvoyt/99dec11beda10084311ada642c2e49f7 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
#!/bin/bash | |
#settings | |
chat_id= //chat_id | |
api_key= //bot api key | |
#code | |
file=$1 | |
url=https://api.telegram.org/bot$api_key/sendDocument | |
curl -F "chat_id=$chat_id" -F "document=@$file" -X POST $url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment