One API: Receive message callback

Clickatell will asynchronously send a callback to your application with the details of any messages that were received via either your SMS or WhatsApp channels (incoming messages sent from the end user’s mobile phone to your business account).

Note that the sequence in which message callbacks are received is not guaranteed to be the original sequence in which these messages were initiated by users. The callback will return the incoming messages with a timestamp generated upon receiving them in the Clickatell system. The exact implementation of this timestamp could vary from channel to channel.

Receive Message Callback

Below is a standard callback sample that is generated when an incoming message has been received by the platform:

POST Request


{
  "integrationId": "fa8090815f05d5ed015f0b5b56080cd2",
  "integrationName": "My integration",
  "event": {
    "moText": [
      {
        "channel": "whatsapp",
        "messageId": "3a89680503414383af44dcd0e4e5f184",
        "relatedMessageId": "d33eef0838a121f71069a4cc8d55c19e",
        "relatedClientMessageId": "d33eef0838a121f71069a4cc8d55c19e",
        "from": "2799900001",
        "to": "2799900002",
        "timestamp": 1506607698000,
        "content": "Text Content of the reply message",
        "charset": "UTF-8"
      }
    ]
  }
}

Media Message Callback

When a media message is received from the end user, our platform will convert the media object into a base64 encoded string as the message content. The media message callback will also contain additional information like content-type and caption that identifies the media object type.

POST Request


{
  "integrationId": "fa8090815f05d5ed015f0b5b56080cd2",
  "integrationName": "My integration",
  "event": {
    "moMedia": [
      {
        "channel": "whatsapp ",
        "messageId": "7ed16cedd7ca7c4d252c7ec854dec3cb",
        "relatedMessageId": "8f287d93f5e5c5fd3ba228fef124c975",
        "relatedClientMessageId": null,
        "from": "2799900001",
        "to": "2799900002",
        "timestamp": 1506607698000,
        "content": "Base64 Binary Media Stream Content",
        "sha256Hash": "529fd5482f43db39992a894bbe4216f51a4d724131a97b93cc5589433b545820", 
        "caption": "Message caption text"
      }
    ]
  }
} 

Setting a username & password on callback (Optional)

It is possible to predefine a username and password for your message callbacks. This value will then be included as parameters in the body to allow for system authentication.

Clickatell will asynchronously send a callback to your application with the details of any messages that were received via either your SMS or WhatsApp channels (incoming messages sent from the end user’s mobile phone to your business account). Note that the sequence in which message callbacks are received is not guaranteed to be the original sequence in which these messages were initiated by users. The callback will return the incoming messages with a timestamp generated upon receiving them in the Clickatell system. The exact implementation of this timestamp could vary from channel to channel.

Receive Message Callback

Below is a standard callback sample that is generated when an incoming message has been received by the platform: POST Request

{
  "integrationId": "fa8090815f05d5ed015f0b5b56080cd2",
  "integrationName": "My integration",
  "event": {
    "moText": [
      {
        "channel": "whatsapp",
        "messageId": "3a89680503414383af44dcd0e4e5f184",
        "relatedMessageId": "d33eef0838a121f71069a4cc8d55c19e",
        "relatedClientMessageId": "d33eef0838a121f71069a4cc8d55c19e",
        "from": "2799900001",
        "to": "2799900002",
        "timestamp": 1506607698000,
        "content": "Text Content of the reply message",
        "charset": "UTF-8"
      }
    ]
  }
}

Media Message Callback

When a media message is received from the end user, our platform will convert the media object into a base64 encoded string as the message content. The media message callback will also contain additional information like content-type and caption that identifies the media object type. POST Request

{
  "integrationId": "fa8090815f05d5ed015f0b5b56080cd2",
  "integrationName": "My integration",
  "event": {
    "moMedia": [
      {
        "channel": "whatsapp ",
        "messageId": "7ed16cedd7ca7c4d252c7ec854dec3cb",
        "relatedMessageId": "8f287d93f5e5c5fd3ba228fef124c975",
        "relatedClientMessageId": null,
        "from": "2799900001",
        "to": "2799900002",
        "timestamp": 1506607698000,
        "content": "Base64 Binary Media Stream Content",
        "sha256Hash": "529fd5482f43db39992a894bbe4216f51a4d724131a97b93cc5589433b545820", 
        "caption": "Message caption text"
      }
    ]
  }
} 

Setting a username & password on callback (Optional)

It is possible to predefine a username and password for your message callbacks. This value will then be included as parameters in the body to allow for system authentication.