Telegram Messenger on the RaspberryPi

Some of you know about the safer WhatsApp Alternative – Telegram. If you also want to send and receive Messages, Pictures and Videos on your Pi, this is the place for you. All you need is an additional Sim Card to receive the SMS. In a later tutorial, we will use receiving Messages to perform Actions on the Pi.

I use the Telegram Messenger CLI for Ubuntu. For this, some Packages have to be installed:

sudo apt-get install libreadline-dev libconfig-dev libssl-dev libjansson-dev python-dev lua5.2 liblua5.2-dev libevent-dev lua-lgi

Now the Package is loaded by Git and changed into the folder.

git clone --recursive && cd tg

Then it is configured


and created (that may take a while):


Now only the Mobile Number and First and Last Name (which should be in the Profile) must be specified. Attention: The number must be in the format +4917612345678. The Last Name can also be skipped with Enter.

Tip: Andreas has made me aware in the comments that a landline number is also possible. To do this, enter  call at the pin query and confirm with Enter. You will then be called on this number and get the pin code announced.

bin/telegram-cli -k

Now you can use some commands to send Messages / Pictures / Videos or add Contacts.

An overview of the commands can be found here.

Add Contact
add_contact <phone-number> <first-name> <last-name>

Example: add_contact 4917612345678 Raspberry Pi

Send Message
msg <peer> Text

Example: msg Raspberry_Pi 'Hello, this is a test.'
In the contact name, spaces become underscores. With Tab, you can automatically complete a contact name.

Start Secure Chat
create_secret_chat <user>

Example: create_scret_chat Raspberry_Pi


global_search <peer>

Example: global_search Hello
All messages are searched for the term(s).

Show Contact Information
user_info <user>

Example: user_info Raspberry_Pi
All commands are as I said here.

6 Responses

  1. Madison Square Garden (MSG), which owns the Forum, filed the suit claiming that the city of Inglewood, Butts and the Inglewood City Council defrauded and deceived them out of the lease to a 15-acre site the city held.

  2. Hi,
    I have some issues when I execute the “make” comand… can you write me by mail?
    Thank you in advance.

  3. the make command gives some erronous output:
    tgl/crypto/rsa_pem_openssl.c: In function ‘TGLC_rsa_new’:
    tgl/crypto/rsa_pem_openssl.c:41:6: error: dereferencing pointer to incomplete type ‘RSA’ {aka ‘struct rsa_st’}
    ret->e = unwrap_bn (TGLC_bn_new ());
    tgl/crypto/rsa_pem_openssl.c: In function ‘TGLC_rsa_n’:
    tgl/crypto/rsa_pem_openssl.c:52:1: warning: control reaches end of non-void function [-Wreturn-type]
    tgl/crypto/rsa_pem_openssl.c: In function ‘TGLC_rsa_e’:
    tgl/crypto/rsa_pem_openssl.c:53:1: warning: control reaches end of non-void function [-Wreturn-type]
    make: *** [Makefile.tgl:20: objs/crypto/rsa_pem_openssl.o] Error 1

    And it doesn’t find the telegram-cli command either:

    pi@raspberrypi:~/tg $ bin/telegram-cli -k
    -bash: bin/telegram-cli: No such file or directory

    I have tried several procedures that I found on the net, but none of them seem to work. Is there anyone experiencing the same problem? Anyone maybe with a solution please?

    Thanks for any help in advance!


Leave a Comment

Your email address will not be published.