Forward SMS → REST API — Advanced Menu Documentation

Documentation for every advanced option available in the app. Use this page as the reference for configuration, expected behavior, payload examples and recommended best practices.

1. Message Q (Retry Failed Messages)

Controls retry behavior for any SMS forwarding that fails.

Settings

Behavior: When the app posts (or GETs) the endpoint and receives a non-2xx HTTP response, or when the request times out / network error occurs, the message is scheduled to be retried after the configured delay. Retries continue until the message either succeeds (2xx) or reaches the configured max attempts.

Recommended defaults: Retry after 5 min and Max attempts 5 (initial attempt + 4 retries) for most deployments.

Example schedule

  1. Attempt 1 — immediate
  2. Attempt 2 — after 5 minutes
  3. Attempt 3 — after 10 more minutes
  4. Attempt 4 — after 20 more minutes
  5. Attempt 5 — after 40 more minutes → then stop

>

2. Use SMS Polling (boolean)

Choose between event-driven SMS handling vs polling the SMS store periodically.

When off: the app uses the platform's event-based SMS receiver (e.g. Android BroadcastReceiver) and forwards messages as they arrive.
When on: the app polls the SMS inbox every N seconds to look for unprocessed messages and forwards them.

Tradeoffs: Polling increases CPU/wakeups and battery consumption; event-based is more efficient and real-time.


>

3. Configurator Server

Allow remote code or service to change the main endpoint used by the app.

Options

Behavior: When active, the app periodically calls the Configurator Server and will change its internal configuration main ENDPOINT. See simple configuration server that changes the endpoint of the device according to its appId

<?php
      $appId = "";
      if(isset($_GET["appId"])){
          $appId = $_GET["appId"];
      }
      if($appId=="c3c675a9-c9ad-4e25-9bc5-e67fa9c67641"){
          echo("server=http://myapi35.com/api.php");
      }else if($appId=="c3c675a9-c9ad-4e25-9bc5-e67fa9c67640"){
          echo("server=http://myapi5.com/api.php");
      }else{
          echo("server=http://myapi2.com/api.php");
      }
?>

>

4. Liveliness Server

The app periodically reports its status to a liveliness endpoint.

Settings

Example payload (POST)


  {
    "availableInternalMemorySize":"22,482MiB",
    "availableExternalMemorySize":"22,482MiB",
    "totalExternalMemorySize":"104,713MiB",
    "paid":"false",
    "active":"true",
    "externalMemoryAvailable":"true",
    "sentCount":"2",
    "batLevel":"47"
  }

On the server side, you can write code that will notify you when a device has low battery for example. Watch a video


>

5. Internal Server (for Monitoring)

Run a small HTTP server on the device to expose its status

Options: enable/disable. When enabled, the internal server binds to a local port and answers to "GET" request. Example: curl --location '192.168.1.191:8084'

Example payload (GET)


{
    "smsAppRunning": "true",
    "active": false,
    "externalMemoryAvailable": "true",
    "availableInternalMemorySize": "22,429MiB",
    "availableExternalMemorySize": "22,429MiB",
    "totalExternalMemorySize": "104,713MiB",
    "sentCount": 2,
    "batLevel": 45
}


>

6. Custom Header

Add named HTTP headers to every request performed by the app.

Use cases: partner-specific headers, trace identifiers, device names.

Header Name: X-Device-Name
Header Value: DEVICE-12345

Resulting request header:
X-Device-Name: DEVICE-12345

>

7. Additional Parameters sent in POST and GET requests

Extra parameters the user can add to every forwarded request.

Parameters may be sent either as query parameters (for GET) or as form fields / JSON body (for POST). The app supports optional flag Post as JSON Object — when enabled, the POST payload will be a JSON object with the SMS fields and the additional parameters.

Example Values From Post. "extra1" and "extra2" are the "Additional Parameters" from the advanced menu

        
extra1	Koko
extra2	Momo
phone	+9721234567
proxy	001-1234567
sim	1
text	Test Message
time	0

Example (When POST as JSON enabled)

POST https://api.example.com/sms
Content-Type: application/json

{
  "proxy":"001-1234567",
  "phone":"+9721234567",
  "sim":"1",
  "text":"Test Message",
  "time":"0",
  "extra1":"Koko",
  "extra2":"Momo"
}

>

8. Slot Labels

Human-readable labels per SIM slot. Sent with each request to identify which SIM received the SMS.

Example: slotLabel => 'some label'


        
        {
          "proxy":"N\/A",
          "phone":"+0011234567",
          "displayOriginatingAddress":"+0011234567",
          "sim":"1",
          "extra2":"Momo",
          "slotLabel":"some label",
          "serviceCenterAddress":"+0011234567",
          "text":"msg",
          "time":"1759263176000",
          "extra1":"Koko"
        }

>

9. Schedule Settings (Off Hours)

Define up to 3 time ranges when forwarding is suspended.

Behavior: If the app receives an SMS during an off-hours range it will drop (ignore) the message

Example ranges (local time):

Range 1: 00:00 - 07:00
Range 2: 12:00 - 13:00
Range 3: 23:00 - 23:59

The app should allow weekly repetition (Mon–Sun) and optionally timezone specification. When queuing messages during off-hours, include a delayedUntil field in the payload.


>

10. Alternative Server URL

Fallback endpoint when the main endpoint fails or times out.

Behavior: If the main endpoint does not respond (timeout or fatal error) or returns non 'OK' response, the app will try the alternative endpoint. After a successful forward to alternative, the app may mark it successful and not try the main endpoint again for that message.


>

11. Save SMS Logs

Option to persist logs of forwarded messages on the device.

Settings: On / Off. When On, store a compact log entry for each forwarded message containing timestamp,message body, source number, destination and status


>

12. Replay Server Response

Option to SMS back the response from the endpoint to the original sender.

Behavior: When enabled, after receiving the endpoint response (body), the app will send an SMS message back to the from number containing the response from the endpoint. In this case the server (endpoint) should not return 'OK' as normally expected


>

13. Application ID

Unique identifier that represents this installation / device

Click on the like to copy value to clipboard


>

14. Default SMS App

Whether the app should become the device's default SMS handler.

In some cases the APP needs to be the default SMS application on the device


>

15. Transfer License

Remove license from this device to move it to another device.

The Transfer License flow should:

  1. Revoke local license
  2. Notify user of success if action finished with success status
  3. Once click the APP will return to work in DEMO mode!!!

For more detail see: forward_sms_to_api_transfer.php


>

16. Debug Logs

Turn on/off detailed debugging logs. Option to send logs to developer and to delete them.

When enabled, store extended traces to device local storage. Provide a UI to:


>