HTTP API - Query USSD Reply

From Ultiroam User Docs
Revision as of 23:02, 3 May 2024 by Administrator (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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!"}]}