This example shows how to program a Telegram Bot for shortening URLs using a free url shortner JSON Api.
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j8
./urlshortener_bot YOUR_BOT_TOKEN
- Open the Telegram mobile app and search BotFather
- Send BotFather a command /newbot
- Follow instructions to create a new Bot
- After you finish the instructions, you will receive a Bot Token, make sure you keep it secured.