Incoming Message Notifications

Incoming messages to numbers & apps registered on IMIconnect can be forwarded to client applications by configuring a Inbound Settings URL in service settings.

🚧

Inbound Settings URL - Services/General Settings

You will need to configure a endpoint URL in general settings under services to receive incoming message notificaitons

1271

SMS


{
    "userId": "$(customerId)",
    "channel": "SMS",
    "da": "$(service_code)",
    "oa": "$(msisdn)",
    "message": "$(actual_message)",
    "tid": "$(tid)",
    "datetime": "$(datetime)",
    "ts": "$(ts)",
    "timeStamp" : "$(ts)",
    "x_networkid" : "$(x_networkid)"

}
{
  "userId": "9009",
  "channel": "SMS",
  "oa": "441157070619",
  "da": "918886661353",
  "message": "Simple Text",
  "tid": "105eddec-dd53-433d-9d6f-37f10ac76a06",
  "datetime": "2015-04-12 13:00:19",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "x_networkid" : "10"
}

RTM


{
    "userId": "$(customerId)",
    "channel": "Rtm",
    "appId": "$(appId)",
    "event": "$(event)",
    "ts": "$(ts)",
    "timeStamp" : "$(ts)",
    "tid": "$(tid)",
    "message": "$(message)",
    "attachments" : "$(attachment)",
    "replyTo": "$(evtTopic)"
}
{
  "userId": "8953",
  "channel": "Rtm",
  "appId": "SA28064527",
  "event": "MO",
  "message": "Simple text",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "44003228-0498-4559-9342-c9e05c7fdfa6",
  "attachments": "",
  "replyTo": "28thJuly"
}

Facebook


{
  "userId": "$(customerId)",
  "channel": "Facebook",
  "psid": "$(psid)",
  "appId": "$(appId)",
  "event": "$(event)",
  "ts": "$(ts)",
  "timeStamp" : "$(ts)",
  "tid": "$(tid)",
  "message": "$(message)",
  "attachments": "$(attachments)",
  "locale": "$(locale)",
  "gender": "$(gender)",
  "timezone": "$(timezone)"
}

Examples

{
  "userId": "8953",
  "channel": "Facebook",
  "appId": "a_636035637428953782",
  "event": "MO",
  "psid": "1037878796267914",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "38b0b8da-c3ed-44cd-bc9e-2403bea529cd_0",
  "message": "Simple Text",
  "attachments": "",
  "locale": "en_US",
  "gender": "male",
  "timezone": "5.5"
}
{
  "userId": "8953",
  "channel": "Facebook",
  "appId": "a_636035637428953782",
  "event": "MO",
  "psid": "1037878796267914",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "158828d0-9242-472b-bf25-e67026c69636_0",
  "message": "",
  "attachments": "[{\"payload\":{\"url\":\"https:\/\/scontent.xx.fbcdn.net\/v\/t35.0-12\/13682620_539022026303737_1111397419_o.jpg?_nc_ad=z-m&oh=5f15c5db7900be7a79ec5f7810a3d4be&oe=579C2B3D\"},\"type\":\"image\"}]",
  "locale": "en_US",
  "gender": "male",
  "timezone": "5.5"
}
{
  "userId": "8953",
  "channel": "Facebook",
  "appId": "a_636035637428953782",
  "event": "MO",
  "psid": "1037878796267914",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "cd5c3fea-0169-4075-a50c-ddfd731d73eb_0",
  "message": "",
  "attachments": "[{\"payload\":{\"url\":\"https:\/\/video.xx.fbcdn.net\/v\/t42.3356-2\/13862946_539025056303434_1490024390_n.mp4\/video-1469713591.mp4?vabr=261485&oh=9046f1a7f78711f8c929df57620c6515&oe=579BBDDF\"},\"type\":\"video\"}]",
  "locale": "en_US",
  "gender": "male",
  "timezone": "5.5"
}
{
  "userId": "8953",
  "channel": "Facebook",
  "appId": "a_636035637428953782",
  "event": "MO",
  "psid": "1037878796267914",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "f4feefdc-f16c-4de2-887a-9b22bcbc4b9d_0",
  "message": "",
  "attachments": "[{\"payload\":{\"url\":\"https:\/\/cdn.fbsbx.com\/v\/t59.3654-21\/13691952_539021966303743_1334694100_n.aac\/audioclip-1471699879041-4420.aac?oh=b5c676bbf78b620559bcaeec790b2573&oe=579D2E33\"},\"type\":\"audio\"}]",
  "locale": "en_US",
  "gender": "male",
  "timezone": "5.5"
}
{
  "userId": "8953",
  "channel": "Facebook",
  "appId": "a_636035637428953782",
  "event": "MO",
  "psid": "1037878796267914",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "3c131e54-1a3e-46d7-9a84-e9985a8e2f33_0",
  "message": "",
  "attachments": "[{\"payload\":{\"url\":\"https:\/\/scontent.xx.fbcdn.net\/t39.1997-6\/p100x100\/10333099_298592936987572_2124775027_n.png?_nc_ad=z-m\"},\"sticker_id\":\"298592933654239\",\"type\":\"sticker\"}]",
  "locale": "en_US",
  "gender": "male",
  "timezone": "5.5"
}
{
  "userId": "8953",
  "channel": "Facebook",
  "appId": "a_636035637428953782",
  "event": "MO",
  "psid": "1037878796267914",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "6488520b-2f43-4d6d-98b2-65f7f9f087d8_0",
  "message": "",
  "attachments": "[{\"title\":\"Joe's Location\",\"payload\":{\"coordinates\":{\"long\":78.398511094914,\"lat\":17.434871564442}},\"type\":\"location\",\"url\":\"https:\/\/www.facebook.com\/l.php?u=https%3A%2F%2Fwww.bing.com%2Fmaps%2Fdefault.aspx%3Fv%3D2%26pc%3DFACEBK%26mid%3D8100%26where1%3D17.434871564442%252C%2B78.398511094914%26FORM%3DFBKPL1%26mkt%3Den-US&h=oAQGHo3bQ&s=1&enc=AZOWktitnAQChz53RmIFyV-Y-wNJKMktlhVDAeDSAA8fVi0nwdSIoAhQIxfYk8CbRft6rYKn5Ppp95-TFlIWzh-TPFRQBRRfx9jpLyjhjGqo2g\"}]",
  "locale": "en_US",
  "gender": "male",
  "timezone": "5.5"
}
{
  "userId": "8953",
  "channel": "Facebook",
  "appId": "a_636035637428953782",
  "event": "MO",
  "psid": "1037878796267914",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "66a810e7-7800-4567-9316-f2f580e9e6c4_0",
  "message": "",
  "attachments": "[{\"payload\":{\"url\":\"https:\/\/cdn.fbsbx.com\/v\/t59.2708-21\/11645068_10207285897933930_1035858644_n.doc\/sample.doc?oh=9a50be5da6b06c60f76410d2d8973972&oe=579C0291\"},\"type\":\"file\"}]",
  "locale": "en_US",
  "gender": "male",
  "timezone": "5.5"
}
{
  "userId": "8953",
  "channel": "Facebook",
  "appId": "a_636035637428953782",
  "event": "MO",
  "psid": "1037878796267914",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "9aef3e3c-6fa0-431d-9ab4-17dd57cde2c5_0",
  "message": "https://www.goal.com",
  "attachments": "[{\"title\":\"Goal.com\",\"payload\":null,\"type\":\"link\",\"url\":\"https%3A%2F%2Fwww.goal.com%2F\"}]",
  "locale": "en_US",
  "gender": "male",
  "timezone": "5.5"
}
{
  "userId": "$(customerId)",
  "channel": "Facebook",
  "psid": "$(psid)",
  "appId": "$(appId)",
  "event": "$(event)",
  "ts": "$(ts)",
  "timeStamp": "$(ts)",
  "tid": "$(tid)",
  "name": "$(name)",
  "profile_pic": "$(profile_pic)",
  "optin": "$(optin)"
}
{
  "userId": "",
  "channel": "Facebook",
  "psid": "1635633030094183",
  "appId": "a_635984672401175940",
  "event": "OnOptin",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "0db0a903-aa44-4b6b-8851-8e0f068b5608_0",
  "name": "Jack Suraj",
  "profile_pic": "https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/11988450_1499437227047098_59962553964862977_n.jpg?oh=657d5460db724d720780dd9cf2a014af&oe=5818524C",
  "optin": "{\"ref\":\"prod26\"}"
}
{
  "userId": "$(customerId)",
  "channel": "Facebook",
  "psid": "$(psid)",
  "appId": "$(appId)",
  "event": "$(event)",
  "ts": "$(ts)",
  "timeStamp": "$(ts)",
  "tid": "$(tid)",
  "name": "$(name)",
  "profile_pic": "$(profile_pic)",
  "postback": "$(postback)"
}
{
  "userId": "8953",
  "channel": "Facebook",
  "psid": "1037878796267914",
  "appId": "a_636035637428953782",
  "event": "OnPostback",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "20cbc7d1-be4e-416b-8250-d8bd4f303d0f_0",
  "name": "Joe James",
  "profile_pic": "https://scontent.xx.fbcdn.net/v/t1.0-1/s200x200/10354686_10150004552801856_220367501106153455_n.jpg?oh=afdc2c35d5b7230522ee0353a8aff5e8&oe=5824CE50",
  "postback": "{\"payload\":\"1232\"}"
}
{
  "userId": "$(customerId)",
  "channel": "Facebook",
  "psid": "$(psid)",
  "appId": "$(appId)",
  "event": "$(event)",
  "ts": "$(ts)",
  "tid": "$(tid)",
  "locale": "$(locale)",
  "gender": "$(gender)",
  "timezone": "$(timezone)",
  "accountstatus": "$(accountstatus)",
  "name": "$(name)"
}

Twitter


{
    "userId": "$(customerId)",
    "channel": "Twitter",
    "appId": "$(appId)",
    "event": "$(event)",
    "twitterHandle": "$(twitter_handle)",
    "twitterId": "$(twitterid)",
    "ts": "$(ts)",
    "timeStamp" : "$(ts)",
    "tid": "$(tid)",
    "message": "$(message)",
    "attachments": "$(attachments)"
}

Examples

{
  "userId": "8953",
  "channel": "Twitter",
  "appId": "a_636035705699961900",
  "event": "MO",
  "twitterHandle": "wsophyd3",
  "twitterId": "3223165326",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "274decc5-aebe-4d6f-89c2-a4842f2333d0",
  "message": "Simple Text",
  "attachments": ""
}
{
  "userId": "8953",
  "channel": "Twitter",
  "appId": "a_636035705699961900",
  "event": "MO",
  "twitterHandle": "wsophyd3",
  "twitterId": "3223165326",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "5b2a7dbe-a995-4b0b-a471-eb8c9b025249",
  "message": "",
  "attachments": "{\"data\":[{\"id\":758666866629804032,\"image_data\":{\"preview_url\":\"https:\/\/ton.twitter.com\/1.1\/ton\/data\/dm\/758666866600521737\/758666866629804032\/xjTAv-J9.jpg\",\"url\":\"https:\/\/twitter.com\/messages\/media\/758666866600521737\"},\"mime_type\":\"image\",\"attachment_type\":\"image\"}]}"
}
{
  "userId": "8953",
  "channel": "Twitter",
  "appId": "a_636035705699961900",
  "event": "MO",
  "twitterHandle": "wsophyd3",
  "twitterId": "3223165326",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "6b6e5bb2-4888-4fdc-b6a7-ee6f413391c8",
  "message": "",
  "attachments": "{\"data\":[{\"id\":758674629770653696,\"mime_type\":\"video\",\"attachment_type\":\"video\",\"video_data\":{\"preview_url\":\"https:\/\/pbs.twimg.com\/dm_video_preview\/758674629770653696\/img\/_doxz8BnTv6N4KuebTmIiHM4ell5VAlmnMFJupe5mTU.jpg\",\"url\":\"https:\/\/twitter.com\/messages\/media\/758675059481247747\"}}]}"
}
{
  "userId": "8953",
  "channel": "Twitter",
  "appId": "a_636035705699961900",
  "event": "MO",
  "twitterHandle": "wsophyd3",
  "twitterId": "3223165326",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "a7629520-c83c-46bc-8c02-17dd7fbd0835",
  "message": "GIF check",
  "attachments": "{\"data\":[{\"id\":758666898212921345,\"image_data\":{\"preview_url\":\"https:\/\/pbs.twimg.com\/dm_gif_preview\/758666898212921345\/jGzcyYmArXyAubF42H-sGi-9Zvxl8e8ggyZM5JJyvZfp4Z5wEl.jpg\",\"url\":\"https:\/\/twitter.com\/messages\/media\/758667227776192515\"},\"mime_type\":\"gif\",\"attachment_type\":\"gif\"}]}"
}

WeChat


{
    "userId": "$(customerId)",
    "channel": "WeChat",
    "appId": "$(appId)",
    "event": "$(event)",
    "wechat_user_id": "$(wechat_user_id)",
    "message": "$(message)",
    "ts": "$(ts)",
    "timeStamp" : "$(ts)",
    "tid": "$(tid)",
    "attachment": "$(attachment)"
}

Examples

{
  "userId": "8953",
  "channel": "WeChat",
  "appId": "a_636052880766626341",
  "event": "MO",
  "wechat_user_id": "o8E7mwXyrZEt30v_ANl518n3FEec",
  "message": "Simple text",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "49a50726-0328-44cd-9cac-4b54fa33a94b",
  "attachment": ""
}
{
  "userId": "8953",
  "channel": "WeChat",
  "appId": "a_636052880766626341",
  "event": "MO",
  "wechat_user_id": "o8E7mwXyrZEt30v_ANl518n3FEec",
  "message": "",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "c42b4b48-da75-4498-a115-1adb2444a254",
  "attachment": "{\"Format\":\"amr\",\"MediaId\":\"eatc3xuAK-PTpnPjkg7xXu9wasFTkq5KGxnGZhZMTjLyA73-RPx2u3TqPYDkb-KF\",\"type\":\"voice\"}"
}
{
  "userId": "8953",
  "channel": "WeChat",
  "appId": "a_636052880766626341",
  "event": "MO",
  "wechat_user_id": "o8E7mwXyrZEt30v_ANl518n3FEec",
  "message": "",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "d34e611c-10fc-4397-b645-eb6bcd1d7a47",
  "attachment": "{\"MediaId\":\"dLiahMp0UzuwMaUtExQg-V4K8Xn1xBCdghEbJrbptYnnZde4I1-jRJNktZgJPBnw\",\"type\":\"image\",\"PicUrl\":\"http:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/7ia3Zy3cZcbZjibuFBlRsK7YlKZWDhmsFvEk05eE1MQ5utXG9cA8Gv1I0sk9YVM1XicxImsIxWHsKSpR5jdALQTyw\/0\"}"
}
{ 
  "userId": "8953",
  "channel": "WeChat",
  "appId": "a_636052880766626341",
  "event": "MO",
  "wechat_user_id": "o8E7mwXyrZEt30v_ANl518n3FEec",
  "message": "",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "e5c67032-8876-435c-b7f0-60bed360db73",
  "attachment": "{\"ThumbMediaId\":\"AiAwCQKvSQnV2yvd1pHbWYuQ39YiPztaRb_ssy10QIavunG9Jd_nHmjbpPbzAHEe\",\"MediaId\":\"ocFJrM4CpzQcevz8eTjvf8vjfmBbE64AD_BNgum8F8mAMNTPfD4KHLZfLIAKwCyi\",\"type\":\"video\"}"
}
{
  "userId": "8953",
  "channel": "WeChat",
  "appId": "a_636052880766626341",
  "event": "MO",
  "wechat_user_id": "o8E7mwXyrZEt30v_ANl518n3FEec",
  "message": "",
  "ts": "2015-04-12T13:00:19.456Z",
  "timeStamp" : "2015-04-12T13:00:19.456Z",
  "tid": "5fe70751-d9e0-4284-9195-08e63f12f84e",
  "attachment": "{\"Label\":\"P No 709, Rd No 44\",\"Scale\":\"15\",\"type\":\"location\",\"Location_X\":\"17.434931\",\"Location_Y\":\"78.398493\"}"
}