Receive SMS (Callback)

To get started the first thing you need to do is buying a virtual number. This you can do in the panel.

NOTE
To use this method you need to specify the url callback in your account.

Request to your server

When we receive sms from the operator we will send it to your server instantly in batches, so each request can contain up to 1,000 messages in a JSON format.

Array of delivery sms founds.
sms_id The message id.
from The sender of the originator.
to The destination number, this is your virtual number.
text The content of the message.
sms_date Date & time when we received the message from the operator, in the format YYYY-MM-DD HH:MM:SS.
[
    {
        "sms_id":"034d2acec0eb44af842de6a00bf4d934",
        "from":"34666666666",
        "to":"34666666667",
        "text":"Hello 1!",
        "sms_date":"2015-06-02 01:43:47"
    },
    {
        "sms_id":"034d2acec0eb44af842de6a00bf4d892",
        "from":"34666666666",
        "to":"34666666667",
        "text":"Hello 2!",
        "sms_date":"2015-06-02 01:45:03"
    }
]
Two messages sent to your server

Your server response

In order to accept the incoming messages, your server must respond with HTTP status code 200 OK. If you cannot process the data at this time, for example, due to a database problem, you can return any other error such as status code 500. If a status code other than 200 is received, the request will be retried every 30 minutes for a period of 6 hours.