# Receiving Inbound SMS

### **messages\_get()**

<mark style="color:green;">`GET`</mark> [`/https://eu-api.panaceamobile.com/json?`](#messages_get)

Best practice is to use this function starting with last\_id = 0, then as messages are received, to store last\_id as the highest message ID you receive back from the API request. Results are limited to 50 at a time.

<table><thead><tr><th>HTTPS GET Parameter</th><th width="185">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>action</code></td><td>messages_get</td><td>This function returns all inbound (MO) messages for the user which have an ID larger than 'last_id'.</td></tr><tr><td><code>username</code></td><td>usernamex</td><td>Your account username.</td></tr><tr><td><code>password</code></td><td>passwordy</td><td>Your account password.</td></tr><tr><td><code>last_id</code></td><td>0</td><td>Best practice is to use this function starting with last_id = 0, then as messages are received, to store last_id as the highest message ID you receive back from the API request. Results are limited to 50 at a time.</td></tr></tbody></table>

**Example:**

{% code overflow="wrap" %}

```
{"status":0,"message":"OK","details":[{"id":"11","created":"2023-04-09 19:25:09","from":"27832659217","to":"20000","data":"Test MO Generated","charset":"UTF-8"},{"id":"10","created":"2023-04-09 19:24:02","from":"27832659217","to":"20000","data":"Test MO Generated","charset":"UTF-8"}]}
```

{% endcode %}

### Reply Delivery Channels

Alternatively, you can have all replies sent to your inbox forwarded to a **web service** of your choice using an end-point URL to push these replies to via an **HTTP GET** call-back or **SMPP**:

In the **SMS Numbers** section of the dashboard, you can view and manage the various numbers associated with your account.&#x20;

Here you're able to set the forwarding channel for **inbound messages**. Users can choose from several forwarding options: Default setting, HTTP, or SMPP, each catering to different integration and handling needs.&#x20;

The **Default** setting refers to the Global setting for your user account meaning ALL replies that come back into your inbox. By selecting **Edit** you’ll be presented with a few options.

<figure><img src="https://1540678005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAhO8D7o8LHsStWZCTlCt%2Fuploads%2FBdIiuSzjr8ldWkgPGGd7%2FScreenshot%202024-02-22%20at%2015.33.55.png?alt=media&#x26;token=fafa6fe5-9d06-4ffb-b115-7aad5d6736a2" alt=""><figcaption><p>Edit Reply Delivery Channels</p></figcaption></figure>

### SMPP

SMPP (Short Message Peer to Peer) allows all inbound messages to be pushed over SMPP to your SMPP server when bound as an ESME to our platform.

### Inbound Trigger

You can have multiple triggers that define different actions according to conditions/filters. Example message containing any or specific words, coming from a specific number, any or all inbound messages, etc.

Each trigger can also define one or multiple actions e.g. send an email, send an SMS, call a URL, Add/Remove a number to/from a list

### HTTP&#x20;

This setting will allow a server URL to be called with an HTTP GET to push all replies over HTTP. The structure of the payload when we call your URL is as follows:&#x20;

{% code overflow="wrap" %}

```
http://www.yoururl.co.za/tmp/inbox/replies.php?&to=1234567890&from=27123456789&charset=UTF8&message=Hello&code=1001&client_reference=123&mcc=655&mnc=01&mo_message_id=161145956
```

{% endcode %}

<figure><img src="https://1540678005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAhO8D7o8LHsStWZCTlCt%2Fuploads%2FH2gVVa8o5lZQVjN3zg1s%2FScreenshot%202024-02-22%20at%2015.34.15.png?alt=media&#x26;token=6ca8b5b2-c7e6-481b-83e0-51e9663bb556" alt=""><figcaption><p>Reply Delivery URL (HTTP)</p></figcaption></figure>
