Receive RCS messages

Discover how to effortlessly forward incoming RCS messages and delivery statuses to your application using our API with this comprehensive guide. With clear and concise instructions, you can streamline your messaging process easily.

Event-Based System

Our application's event-based system ensures that updates are provided in a timely manner. To stay informed, subscribe to two different events available for each RCS channel within the messaging portal.

Incoming Message

Our application generates an event when your RCS agent receives an incoming message. The event contains crucial metadata about the message, including the sender's information, message content, and forwarding timestamp.

Delivery Status

Our system generates a delivery status event as soon as a message is sent and either successfully delivered or failed to deliver. This event includes essential details such as the recipient's information, message ID, delivery timestamp, and message status (read, delivered, or failed).

Event Subscription

Prerequisite

  • You must have an active RCS channel.

  • You should have access to RCS Assistant in the messaging portal to configure the rules.

You can subscribe to these events and forward the incoming RCS messages and delivery status in the following way:

2. Forwarding to an HTTP URL

To receive notifications on your server, you need to create an endpoint and configure an HTTP URL in the HTTP forward rule of the RCS assistant. Whenever a message is received by the RCS agent assigned to the channel, our platform checks the configured events and rules for that channel. If the specified conditions are satisfied, the platform forwards the message as an HTTP POST request containing a JSON payload that describes the change. You can configure a separate URL for each channel.

The JSON payload and its components are described in our Open API documentation and its format is based on RCS message formats, please refer to the official documentation: RCS MaaP Chatbot API Specifications.

Please note: When using HTTP URL, you must confirm receipt of the notification with the response body.

Example Payload for Incoming message

{
  "customerChannelUuid": "68fd0c25-3bd7-4b03-8234-0cf112439bb8",
  "sender": "4369912345678",
  "recipient": "4369912345679",
  "type": "rcs",
  "rcsNotification": {
    "RCSMessage": {
      "timestamp": 1708594446484,
      "textMessage": "Text",
      "msgId": "Mx=3d-Q27fR7iZbMHcbO8=cw"
    },
    "event": "message",
    "messageContact": {
      "userContact": "+4369912345678"
    }
  }
}

Example Payload for Delivery message

{
  "customerChannelUuid": "68fd0c25-3bd7-4b03-8234-0cf112439bb8",
  "sender": "4369912345678",
  "recipient": "4369912345679",
  "transferId": "0065709970004e2a559d",
  "clientMessageId": "",
  "type": "rcs",
  "rcsNotification": {
    "RCSMessage": {
      "timestamp": 1708594126072,
      "status": "displayed"
    },
    "event": "messageStatus",
    "messageContact": {
      "userContact": "+4369912345678"
    }
  }
}

Response JSON

{
"statusCode" : "...",
"statusMessage" : "...",
}