Forward SMS To A URL or API

api to forward sms to URL

POST URL function

Post Body example:

{"phoneNumber":"222333444","sms":"Hello sms - From 222333444"}

Post Options:

Auto Forward SMS app offers you 3 options for forwarding incoming SMS to a URL via POST: form-data or x-www-form-urlencoded or raw (JSON) .

Both the FWD ALL INCOMING SMS and CREATE TASK screens have this function.


For multipart/form-data, the body is separated by a particular string boundary.

A form using form-data content type:
HttpResponse response ="")
.header("content-type", "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW")
.header("cache-control", "no-cache")
.header("Postman-Token", "5d3c2fb9-7113-4e2a-b9ad-319ce66ef60a")
.body("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"phoneNumber\"\r\n\r\nxxxxxx\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"sms\"\r\n\r\nzzzzzzz\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--")


For x-www-form-urlencoded, the body of the HTTP message is sent as a long query string, contains name-value pair separated by "&" character.

An example of a simple form using the application/x-www-form-urlencoded content type:
HttpResponse response ="")
.header("Content-Type", "application/x-www-form-urlencoded")
.header("cache-control", "no-cache")
.header("Postman-Token", "0146a6af-b9da-429d-b2e2-68e70137fbbc")

Useful info: Stack Overflow has info about these functions and what they mean. Click here to view Stack Overflow page

raw JSON

When you select "Raw", the body will be pre-generated as below:
phoneNumber: [PHONE_NUMBER],

You can include any key-value you want. As long as Auto Forward SMS finds the [PHONE_NUMBER], it will be replaced by the sender's phone number. Similar to that, [SMS_CONTENT] will be replaced with the SMS message content.

When you install the app you will be asked to subscribe. What if you don't like the app? No problem. Get a refund via Amazon within 7 days.

We want to further develop this feature, so if you have any special requests or need a different function, please get in touch with our manager Kerryn.

Our Contact Details

Our head office is in Australia, and our office hours are Melbourne time: 9am-6pm Monday to Friday. But we do monitor emails regularly.