How to query a message by its ID

On this page you will learn how you can query a single message by its ID in Ozeki NG SMS Gateway. This solution allows you to receive the content of a single message.

To query the content of a single message you need to type this address into your browser:

http://127.0.0.1:9501/api?action=getmessagebyid&username=admin&password=abc123&msgID=c36d7ee5-16f9-4193-9a75-0537e590e9d3

Specify these values:

"action": "getmessagebyid"
"username": your username used to log into Ozeki NG SMS Gateway
"password": your password in Ozeki NG SMS Gateway
"msgID": is the GUID of the message to be queried

The response will be the follows:

<response>
	<action>getMsgInfoByID</action>
	<data>
		<messageid>c36d7ee5-16f9-4193-9a75-0537e590e9d3</messageid>
		<originator>+17036231081</originator>
		<recipient>10958</recipient>
		<folder>INBOX</folder>
		<senttime>2011.10.17. 13:10:26</senttime>
		<receivedtime>2011.10.17. 13:10:26</receivedtime>
		<creationtime>2011.10.17. 13:10:26</creationtime>
		<callbackid/>
		<state>0</state>
		<operatornames>
			<operatorname>SMPP0</operatorname>
		</operatornames>
		<routes>
			<route>defin_admin</route>
		</routes>
		<optionalfields>
			<optionalfield name="30" value="35333131572D31303133322D303530364E2D333434544600"/>
			<optionalfield name="8528" value="017F"/>
		</optionalfields>
		<messagetype>SMS:TEXT</messagetype>
		<messagedata>Test message</messagedata>
	</data>
</response>

Possible State values:

0 = Idle
1 = Sending
2 = Preparing
10 = Delivery successfull
11 = Delivery rejected
12 = Buffered
13 = Enroute
14 = Expired
15 = Deleted
16 = Undeliverable
17 = Scheduled
18 = Unkonwn
19 = Skipped

More information