Telegram CLI on Raspberry PI

Telegram CLI on Raspberry PI

May 11, 2015
Categories: Development
Tags: raspi, linux

Telegram is an (encrypted) messenger service which also offers an API. This makes it ideal for bots and automation. Here it is shown hot to set up telegram-cli on your Pi.

Get a shell on your RasPi, I prefer to do this over SSH. You can also plug your RasPi to a screen and ann a keyboard.

Build #

sudo apt-get install -y git
sudo apt-get install -y libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev make
git clone --recursive && cd tg
mkdir ~/bin
cp bin/telegram-cli ~/bin/

Then, add this like to your ~/.bashrc to make the binary available in your PATH:

export PATH=$HOME/bin:$PATH

Login #

telegram-cli -k <your pubkey>

Get the public key from (Manual ), you have to register a new app. Save the contents to a file.

Then you have to enter the code you get per sms to your phone.

You can now use the telegram CLI.

← Hack the spectrum - Hide images in Audio files Wifi monitor on a Raspberry Pi →