Chat APIs and In-app Messaging SDKs for Developers, by Developers

Applozic powers multi-platform Chat APIs and in-app Messaging SDKs for Android, iOS and the Web that will enable you to build advanced in-app chat solutions your users will love.

Integrate chat in your application with completely customizable UI kits, powerful messaging APIs and SDKs, developed with exceptional security measures in mind.

Documentation    API Explorer

Webhooks

Webhooks configuration guide

Configure webhook Url in the Applozic dashboard. All messages will be sent to the configured webhook Url in JSON format.
Login to Applozic
Go to Dashboard -> Application List -> Action -> Edit -> Webhooks

Add authentication to this post data request by configuring webhook authentication token in the Applozic dashboard. This authentication token can be any random string.
Go to Dashboard -> Application List -> Action -> Edit -> Security

📘

Note:

We recommend configuring this authentication token in Applozic dashboard as it adds authentication layer for all the API call going from Applozic to your server. This authentication token will be passed as Authentication header in the form of base64 value of authentication token.
Basic Base64Encode of authentication token
Example: Basic YWJjZGVm

Now Applozic Server POST data to the configured Url with the following headers:

Example Given for message forward:

API URL: https://yourcompany.com/message/forward (message forward)

Method Type: POST

Headers:
Content-Type: application/json
Authentication: Basic Base64Encode of authentication token

if authentication token configured in dashboard is abcdef than sample value will be:
Basic YWJjZGVm

Request Body: Posted JSON to configured URL without any attachment :

{
 "key":"message key",
 "from":"sender unique id",
 "to":"receiver unique id",       // In case of One to One Chat
  "groupId": 123456,              // In case of Group Chat
  "clientGroupId": "123456",      // In case of Group Chat
  "groupName": "applozicGroup",   // In case of Group Chat
  "conversationId": 23456,        // In case of Contextual Chat
 "message":"message content",
 "timeStamp":1457958424000,  // Long timestamp value
 "receiverConnected": true,  // Boolean value
 "receiverLastSeenAtTime": 1457958424000 //Long timestamp value
}

Sample Request Call through POSTMAN

Request Body: Posted JSON to configured Url with attachment and metadata passed in the message:

{  
  "key":"message key",
  "from":"sender userId ",
  "to":"receiver userId",             // In case of One to One Chat
  "groupId": 123456,                  // In case of Group Chat
  "clientGroupId": "123456",          // In case of Group Chat
  "groupName": "applozicGroup",       // In case of Group Chat
  "conversationId": 23456,            // In case of Contextual Chat
  "message":"message content",
  "timeStamp":1461590467000,
  "file":{  
    "name":"name of attachment image,file etc",
    "url":"attachment Url",
    "contentType":"image/gif",
    "size":28150,
    "thumbnailUrl":"attachment thumbnail Url"
  },
  "metadata":{
  "key1":"value1",
  "key2":"value2"
  }
}

In case of Undelivered or unread Message webhook:

Request Body: JSON posted to configured URL in case of Undelivered or Unread Message webhook

Example Given for Undelivered Message webhook: (same Sample Json in case of unread message webhook)

Webhook Json for 1-1 chat message undelivered to the user. (List of messages)

[
  {
    "key": "message key",
    "from": "sender unique id",
    "to": "receiver unique id",
    "message": "message content",
    "timeStamp": 1457958424000,
    "receiverConnected": true,
    "receiverLastSeenAtTime": 1457958424000,
    "metadata": {
      "key1": "value1",
      "key2": "value2"
    }
  },
  {
    "key": "message key",
    "from": "sender unique id",
    "to": "receiver unique id",
    "message": "message content",
    "timeStamp": 1457958424000,
    "receiverConnected": true,
    "receiverLastSeenAtTime": 1457958424000,
    "metadata": {
      "key1": "value3",
      "key2": "value4"
    }
  }
]

Webhook Json for group chat message undelivered to the user.

{
"key":"message key",
"from":"sender unique id",
"groupId": 123456, 
"clientGroupId": "123456", 
"groupName": "applozicGroup"
"message":"message content",
"timeStamp":1457958424000, 
"receiverConnected": true, // Boolean value
"receiverLastSeenAtTime": 1457958424000 //Long timestamp value
"file":{
"name":"name of attachment image,file etc",
"url":"attachment Url",
"contentType":"image/gif",
"size":28150,
"thumbnailUrl":"attachment thumbnail Url"
},
"metadata":{
"key1":"value1", / / message metadata
"key2":"value2"
}
"userdetails": [
{
// generic user detail
"userId": "user identifier",
"connected": true, // Boolean value
"status": 1, //Active
"lastSeenAtTime": 1602055617418, // Long timestamp value
"createdAtTime": 1590417328000, // Long timestamp value
"unreadCount": 0,
"email": "emailId",
"deactivated": false, // Boolean value
"connectedClientCount": 0,
"active": true, // Boolean value
"lastLoggedInAtTime": 1602054415900, // Long timestamp value
"lastMessageAtTime": 1599413602852, // Long timestamp value
"roleKey": "09a9238c-1fe9-40d9-b90c-4efd090ba4a3",
"metadata": {}, //user metadata
"roleType": 3,
"connectedLastSeenTime": 1.1602055617418
}
],
"userIds": [List of UserIds to whom the message is not delivered]
}
}

Updated 11 months ago


Webhooks


Webhooks configuration guide

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.