HTTP API - Query USSD Reply
GET https://gateway_ip/api/query_ussd_reply
Request Parameters:
Parameter | Type | Description |
Required Parameter | ||
port | Array | Port(s) for querying USSD reply
Each port should be an integer ranging from 0 to 31 |
Response Parameters:
Parameter | Type | Description |
error_code | Integer | Codes that may be returned:
200: Request has been accepted and processed 400: Request format is not valid 500: Other errors |
sn | String | SN of the gateway |
reply | Array | Replys; each reply includes the following information:
port: port for receiving USSD reply text: USSD reply |
Example of Querying USSD Reply:
Request:
https://gateway_ip/api/query_ussd_reply?port=1,2,3
Response:
{"error_code":200,"sn":"xxxx-xxxx-xxxx-xxxx","reply":[{"port":1, "text":" "},{"port":2, "text": "Test…"},{"port":3, "text": ""}]}
USSD can also be pushed to your application, like:
{"sn":"da00-0030-1901-2817","ussd":[{"port":1,"text":"Thank you!"}]}