Minimalistic server written in go that provides REST endpoints to receive messages as a json paylod as defined by the android sms forwarding app "SMS an PC/Telefon - Automatische Umleitung" and expose the recived message.
Supports simplisitc user and autentification support.
Required parameters: user, pass
Example Payload:
{"subject": "foo", "message": "bar"}
Test API:
curl -X POST -H 'Content-Type: application/json' -d '{"subject": "foo","message": "bar"}' https://localhost/messages/?user=test&pass=1234
Required parameters: user, pass
Test API: curl "https://localhost/messages/?user=test&pass=1234"
Install Brew (skip if you already did)
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install go
brew update&& brew install golang
sudo apt install golang-go
go build smsserve.go
Create the user file and add a user
touch users
echo "test:1234" >> users
Run the server
./smsserve
Create a file called /etc/systemd/system/smsstore.service:
[Unit]
Description=smsstore service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=centos
ExecStart=/opt/smsstore/smsserve
[Install]
WantedBy=multi-user.target
- set your actual username after User=
- set the proper path to your script in ExecStart=
Start the service:
systemctl start smsstore
To get it to automatically get it to start on boot:
systemctl enable smsstore
Install the app "SMS an PC/Telefon - Automatische Umleitung" on your andrioid phone.
Configure an SMS forwarding to a REST server and anter the url of your server e.g.: curl "https://localhost/messages/?user=test&pass=1234"
Install the Tempermonkey brower extention
Adapt the provided "example_userscript.js# userscript to retrieve the message form the server and fill out the web logon form