|
The HTTP Interface is a common way to send SMS from third party applications. It allows you to send SMS using simple HTTP GET or POST requests, or using a [Json REST API[(rest.html).
The HTTP Interface menu is accessible from the Settings menu. You need to be logged in as an administrator to access this menu.
To enable the HTTP and Json REST interface, check the Enable HTTP and REST Interface checkbox.
Access Control allows you to control who can use this interface. The HTTP and REST interfaces are available to Everybody unless they are restricted. If restricted the HTTP requests must supply the Authorization header to specify a valid username and password with sufficient rights.
SysManX has a JSON REST based API that can be used to manage Numberlists, query sent and received messages, and submit messages for sending. This API uses the Open API 3.0 standard. You can browse documentation and test the API with Swagger-UI here
The URL access point for the HTTP Interface is:
http://localhost:5000/sms
Replace localhost with server name or IP-address if you are sending SMS from another machine.
The following parameters can be used:
This request will send a message with the text "test" to number 92929292:
http://localhost:5000/sms?recipient=92929292&message=test
The server will return an HTTP Statuscode 200 (OK) response with a body containing "OK", or any other message if it failed.
This request will send a message with the text "test æøå of nordic letters" to number "92929292".
POST /sms HTTP/1.1
Host: localhost:5000
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Authorization: Basic YWRtaW46cGfdsSFvxwcmQ=
recipient=92929292&message=test+%C3%A6%C3%B8%C3%A5+of+nordic+letters
Note the use of the Authorization header in this sample. It is only required if you have configured SysManX to require authentication for the HTTP Interface.