It is just a handy thing when you work on your laptop. You probably don't want to pick up your phone every time you need to enter an OTP code.
Since Igor's backend doesn't seem to work anymore, I decided to set up my own.
This fork allows you to set up your own backend and telegram bot.
For convenience you can use docker image tarasverq/smsq-backend
Just run it with command
docker run --name smsq -d --env=DOMAIN=<DOMAIN_HERE> --env=BOT_TOKEN=<BOT_TOKEN_HERE> --env=ADMIN_ID=<YOUR_TG_ID_HERE> -p <PORT_HERE>:80 tarasverq/smsq-backend:latest
Variable name | Description |
---|---|
DOMAIN_HERE | Domain with port for tg webhook. Webhook can be set up only on ports 80, 88, 443 or 8443 |
BOT_TOKEN_HERE | Your bot token obtained from @BotFather |
YOUR_TG_ID_HERE | Your TG ID. Easiest way to get it: @username_to_id_bot |
PORT_HERE | Host Machine port |
Example:
docker run --name smsq -d --env=DOMAIN=domain.com:443 --env=BOT_TOKEN=6531881811:AAF111e3coTifgug03-MdxN2tUEh7kp4Sm4 --env=ADMIN_ID=123321 -p 8888:80 tarasverq/smsq-backend:latest
IMPORTANT: Don't forget to send /start
message to your bot before starting up docker image
In case you want to use https (recommended) set up nginx reverse proxy with letsencrypt certs.
Manual
Example nginx conf matching with ports from command above.
server {
server_name domain.com;
location / {
proxy_pass http://127.0.0.1:8888;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
Just install mobile app from releases
- Install Android app
- Open the app
- Put your bot name to first text field. e.g.
my_sms_bot
- Put your backend url with ending slash. e.g.
https://domain.com/
- start forwarding, connect Telegram
- Now you receive your SMS messages in this bot!
Bot: sms_j_bot
Backend URL: https://smsq.jora.wtf/