1.9 KiB
Getting Started
The Android SMS Gateway can work in two modes: with a local server started on the device or with a cloud server at sms.capcom.me. The basic API is the same for both modes and is documented on the Android SMS Gateway API Documentation.
Local server
This mode is recommended for sending messages from local network.
-
Start the app on the device.
-
Activate the
Local serverswitch. -
Tap the
Offlinebutton at the bottom of the screen. -
In the
Local serversection, the local and public addresses of the device, along with the credentials for basic authentication, will be displayed. Please note that the public address is only usable if you have a "white" IP address and have correctly configured your firewall. -
Make a
curlcall from the local network using a command like the following, replacing<username>,<password>, and<device_local_ip>with the values obtained in step 4:curl -X POST -u <username>:<password> -H "Content-Type: application/json" -d '{ "message": "Hello, world!", "phoneNumbers": ["79990001234", "79995556677"] }' http://<device_local_ip>:8080/message
Cloud server
If you need to send messages with dynamic or shared device IP, you can use the cloud server. The best part? No registration, email, or phone number is required to start using it.
-
Start the app on the device.
-
Activate the
Cloud serverswitch. -
Tap the
Offlinebutton at the bottom of the screen. -
In the
Cloud serversection, the credentials for basic authentication will be displayed. -
Make a curl call using a command like the following, replacing
<username>and<password>with the values obtained in step 4:curl -X POST -u <username>:<password> -H "Content-Type: application/json" -d '{ "message": "Hello, world!", "phoneNumbers": ["79990001234", "79995556677"] }' https://sms.capcom.me/api/3rdparty/v1/message