In addition to sending messages through our services, you may also want to be able to receive messages sent to you by end users. To do so, you must first set up an endpoint with Vibes, which will let us know where to route the messages that come in from end users.
In the below article, we'll outline the technical requirements for your endpoint. Once the endpoint is created, please send the URL for your endpoint to your account manager to complete the process.
Setting up your endpoint
Originating Traffic
First, it’s important that your endpoint is compatible with the messages it will be receiving.
Callbacks can originate from several Vibes Data Center locations. Please make sure that your endpoint allows input from the following IPs:
US
- 35.155.139.143
- 52.32.61.199
- 35.161.244.84
- 18.205.120.48
- 52.22.43.57
- 18.232.9.131
- 54.245.204.57
- 54.148.156.236
EU
- 34.243.232.57
- 52.48.241.82
- 34.249.188.130
- 54.247.36.51
- 34.253.250.65
- 54.217.181.160
Your Endpoint Responses
When a call is made to your server, your server should respond to the Vibes API with an appropriate response code. A successfully processed message will return an HTTP Server Response of 2XX.
If the server responds with an HTTP Server Response of anything other than 2XX, then our system will assume that an error occurred and attempt to deliver the message again. This attempt will continue every five minutes, up to a maximum of five retries.
If the message continues to fail, the message will be moved into an error queue and our Operations staff will be alerted. At that point, our Operations staff will reach out to you and work to correct the issue. Once it’s resolved, any messages that are less than 24 hours old can be resent by our Operations staff.
Endpoint response required
Your endpoint must handle all message content delivered, even if it not usable by your endpoint. For example, if a mobile device texts in with a bad keyword, it is still your endpoint’s responsibility to log it and respond with a HTTP Response 200. If not, our system will continually retry the message until it is accepted.
Performance Considerations
To maintain a high-level of service, our callbacks have a relatively short timeout process of two seconds. We recommend minimizing any processing done synchronously on the callback and utilizing store and forward to avoid timeouts (and retries).
Receive an Incoming Message
Once your endpoint is set up, you can start receiving messages from end users. Note that our only capability is to provide the message from the end user to you; Vibes can’t verify keywords and won’t respond to the sender without a request from you.
Example Requests
Single Message
<?xml version="1.0" encoding="UTF-8"?>
<moMessage messageId="234723487234234" receiptDate="YYYY-MM-DD HH:MM:SS Z" attemptNumber="1">
<source address="+18475551212" carrier="103" type="MDN" />
<destination address="12345" type="SC" />
<message>123857AB12</message>
</moMessage>
Split Message
<?xml version="1.0" encoding="UTF-8"?>
<moMessage messageId="63aa6d17-3fcc-47c4-bc23-xxxxxxxxxxxx" receiptDate="2023-07-28 12:56:43-0500" attemptNumber="1">
<source address="+15125551212" carrier="105" type="MDN" />
<destination address="12345" type="SC" />
<message>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis</message>
<longMessageInfo longMessageId="MTIzNDU2Nzg5MDEyMw==" segmentNumber="1" totalSegments="2" />
</moMessage>
<?xml version="1.0" encoding="UTF-8"?>
<moMessage messageId="fbf55189-830f-4c50-8b53-yyyyyyyyyyyy" receiptDate="2023-07-28 12:56:43-0500" attemptNumber="1">
<source address="+15125551212" carrier="105" type="MDN" />
<destination address="12345" type="SC" />
<message> nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderi</message>
<longMessageInfo longMessageId="MTIzNDU2Nzg5MDEyMw==" segmentNumber="2" totalSegments="2" />
</moMessage>
Elements and Attributes of a Request
moMessage
This is the main wrapper element included in the delivery request.
Attribute Name | Description | Data Type | Required? |
---|---|---|---|
messageId | A unique identifier for each message, provided by Vibes. | String | Yes |
receiptDate | The date the message was received in standard XML format. | String | Yes |
attemptNumber | The number of attempts made to deliver the MO message. | Integer | Yes |
source
The element identifying the source—or “sender”—of the message.
Attribute Name | Description | Data Type | Required? |
---|---|---|---|
address | The originating address, (usually a mobile number) of the message. This will be specified in e.164 international format with a leading +. | String | Yes |
carrier | The carrier network the sender is on. This carrier code will need to be specified for any Mobile Terminated (MT) messages for the address. See carrier codes here. | String | Yes |
type | The source address type of the originator. Currently, only MDN for telephone is supported. | String | Yes |
destination
This is the element that identifies the recipient of the message. For example, if the end user sent a text to number 12345, that information will be found here.
Attribute Name | Description | Data Type | Required? |
---|---|---|---|
address | The destination address, such as Short Code, for the message. | String | Yes |
type | The destination address type of the originator. Currently, only SC for "Short Code" is supported. | String | Yes |
message
This element contains the body and content of the incoming message.
longMessageInfo
If the incoming message is longer than a standard text message, it may be split into multiple parts. If so, this element contains information about this long message.
Attribute Name | Description | Data Type | Required? |
---|---|---|---|
longMessageId | An alphanumeric string that is calculated by ESME and included in message object. | String | No |
segmentNumber | The numerical order in which this segment appears in the long message. | Numeric | No |
totalSegments | The total number of segments in the message. | Numeric | No |
Reference Table
The reference tables below contain the same information as above, but in a quick-reference table form.
Element | Attribute Name | Description | Data Type | Required? |
---|---|---|---|---|
moMessage | Main wrapper element indicating that this is a deliver request. | Yes | ||
messageId | A unique identifier for each message, provided by Vibes. | String | Yes | |
receiptDate | The date the message was received in standard XML format. | String | Yes | |
attemptNumber | The number of attempts made to deliver the MO message. | Integer | Yes | |
source | Element identifying the source/originator of the message. | Yes | ||
address | The originating address, (usually a mobile number) of the message. This will be specified in e.164 international format with a leading +. | String | Yes | |
carrier | The carrier network the sender is on. This carrier code will need to be specified for any Mobile Terminated (MT) messages for the address. See carrier codes here. | String | Yes | |
type | The source address type of the originator. Currently, only MDN for telephone is supported. | String | Yes | |
destination | The element that identifies the recipient/destination for the message. | Yes | ||
address | The destination address, such as Short Code, for the message. | String | Yes | |
message | Element identifying the body/content of the message. | Yes | ||
longMessageInfo | This element will appear only if you are using Version 3.2. Element identifying information regarding messages that are split into multiple parts. | No | ||
longMessageId | An alphanumeric string that is calculated by ESME and included in message object. | String | No | |
segmentNumber | The numerical order in which this segment appears in the long message | Numeric | No | |
totalSegments | The total number of segments in the message. | Numeric | No |