ReceiveMessage command
This command can be used to receive an SMS message via the SMS Gateway using HTTP polling. HTTP polling means that you download SMS messages from the inbox folder of the gateway like you would download a webpage. In this section, you can get information about how you can use the ReceiveMessage method, what are the parameters, and you will be presented with an example HTTP request to download incoming messages.
Request parameters
Parameter name | Example value | Description | Mandatory |
Action | receivemessage | The HTTP API command | yes |
AfterDownload | delete | The way messages should be handled after a successful download. Messages can be deleted from the SMS gateway, they can be marked as downloaded and they can be left untouched. If they are left untouched, the next time you initiate a download request they will be downloaded again. | no |
Folder | inbox | The name of the folder. By default messages will be downloaded from the inbox folder. You can use the receivemessage method to download messages from other folders as well. | no |
Limit | 10 | The maximum number of messages to be downloded from the server within the request. You can download the remaining messages with subsequent requests. | no |
Username | admin | Specifies the username. The username and password parameters are used to authenticate the user. | yes |
Password | abc123 | Specifies the password. The username and password parameters are used to authenticate the user. | yes |
ResponseFormat | html | You can specify the format of the user's incoming messages. | no |
Response parameters
Parameter name | Example value | Description | Mandatory |
Code | 200 | Returns the status code of the response. | yes |
Message | Command successfully executed | Returns th description of the response code. | yes |
NotificationName | CallConnected | Name of the notification request type. | no |
Example request and response
URL request
http://127.0.0.1:9509/api?command=ReceiveMessage&action=receivemessage&Username=HTTP_User_1&Password=qwe123&Folder=inbox&Limit=2&AfterDownload=delete
Response
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE response PUBLIC "-//OZEKI//DTD XML 1.0//EN" "http://www.ozekisms.com/DTD/response.xml"> <response> <action>receivemessage</action> <data> <message> <messageid>ERFAV23D</messageid> <originator>06301234567</originator> <recipient>06201112222</recipient> <messagetype>SMS:TEXT</messagetype> <messagedata>Hello world</messagedata> <senttime>2008-01-16 10:04:00</senttime> <receivedtime>2008-01-18 20:58:04</receivedtime> </message> <message> <messageid>GYT4455D</messageid> <originator>06209994444</originator> <recipient>06201112222</recipient> <messagetype>SMS:TEXT</messagetype> <messagedata>Second message</messagedata> <senttime>2008-01-16 10:08:00</senttime> <receivedtime>2008-01-18 20:58:05</receivedtime> </message> </data> </response>
More information
- Comando de transferencia asistida
- Comando de transferencia ciega
- Comando de llamada
- Comando de reenvío de llamada
- Comando para listar historial de llamadas
- Comando para colgar
- Comando para poner en espera
- Comando para listar llamadas activas
- Comando para listar extensiones
- Comando para listar tipos de extensión
- Comando para reproducir
- Comando para grabar
- Comando de solicitud
- Comando para enviar DTMF
- Hablar
- Comando para quitar de espera
- Comando para recibir mensaje
- Comando para enviar correo
- Comando para enviar mensaje
- Comando para enviar SMS
- Comando de arreglo
- Comando para emitir tono
- Comando para retraso
- Comando para eliminar archivo
- Comando para cada
- Comando para ir a
- Comando para mover archivo
- Comando para rechazar
- Comando para enrutar
- Comando para enviar notificación de alarma
- Comando para enviar mensaje
- Comando para entrada de usuario
- Comando para variable
- Comando para esperar mensaje
- Comando para configuración de llamada
- Comando para salir
- Listar contactos de agenda
- Comando para listar nombres de agenda
- Recibir notificación de alarma