USSD API Sending – How to send USSD via API
Open the interface as shown in the figure.
Pass http://IP:80/sendussd?link for a detailed explanation of the specific parameters.
Authentication failed: Valid user name and password required
HTTP to USSD
————————-
Usage: http://ip:port/sendussd?username=xxx&password=xxx&message=xxx&port=xxx&timeout=xxx
1. Parameter parsinga
1.1 User name
Description: Login user name, can be set in USSD page
Default value: None
Required field: Yes
1.2 password
Description: The password for login, which can be set in the USSD page
Default value: None
Mandatory field: Yes
1.3 message
Description: Text message content.
Default value: None
Mandatory field: Yes
1.4 port
Description: The port to which the SMS will be sent.
Default: The default SMS will be sent from a randomly selected port among all ready ports.
Mandatory: Optional
Example: 1 or 1,2
1.5 timeout
Description: Timeout for sending USSD
Default value: 0
Mandatory: Optional
1.6 id
Description: The id number of the sent USSD
Default value: null
Mandatory field: optional
2. SMS report format (charset: UTF-8)
2.1 JSON
{
“message”: “xxx”,
“report”:[{
“0”:[{
“port”: “1”,
“time”: “2014-04-29 11:11:11”,
“id”: “1122”,
“result”: “sending”
}],
“1”:[{
“port”: “2”,
“time”: “2014-04-29 11:11:12”,
“id”: “1123”,
“result”: “fail”
}],
}]
}
2.2 STRING
message:xxx
–record 1 start–
port: 1
time: 2014-04-29 11:11:11
id: 1122
result: sending
–record 1 end–
–record 2 start–
port: 2
time: 2014-04-29 11:11:12
id: 1123
result: fail
–record 2 end–
Example: Sending *#301# using a mobile card