{ "items": [ { "webhookId": "d28HJw", "source": "channel.message", "serial": "e91URQe6QA0gwm05496618:2", "timestamp": 1479301189860, "name": "channel.message", "data": { "channelId": "foob", "site": "eu-central-1-A", "messages": [ { "id": "9qaOH1C4tO:2:0", "name": "foo1", "connectionId": "9qaOH1C4tO", "timestamp": 1479301189856, "data": "<json message 1>" }, { "id": "8q5aOH3C44O:5:5", "name": "foo2", "connectionId": "9qaOH1C4tO", "timestamp": 1479301189859, "data": "<json message 2>" } ] } }, { "webhookId": "d28HJx", "source": "channel.message", "serial": "e91URQe6QA0gwm05496618:4", "timestamp": 1479301189866, "name": "channel.message", "data": { "channelId": "foob", "site": "eu-central-1-A", "messages": [ { "id": "9qaOH1C4t9:2:0", "name": "foo3", "connectionId": "9qaOH1C4tO", "timestamp": 1479301189877, "data": "<json message 3>" } ] } } ] }For your reference a description of each property in the message container is given in the table below. We advise you to not use any of these properties, except from the JSON array “messages”, since in the near future properties might be added or removed from the container, except “items.data.messages”.
Name | Description |
webhookId | An internal unique ID for the configured WebHook. |
source | The source for the WebHook, namely “channel.message”. |
timestamp | A timestamp represented as milliseconds since epoch for the published message. |
data | An object containing the attributes defined below in JSONPath format data.*. |
data.channelId | Name of the channel that the presence event belongs to. |
data.site | An internal site identifier indicating the datacenter from which the message was published. |
data.messages | An array of messages with fields for each message described below. |
data.messages.id | Unique ID assigned by Kolibri to this message |
data.messages.name | A string representing the event name for the published message, see the publish method |
data.messages.connectionId | The public unique identifier for the publisher’s connection. Find out more about connectionId |
data.messages.timestamp | The time in milliseconds since the epoch when this message was received by Kolibri. |
data.messages.data | An utf-8 encoded string representing a JSON object containing the message to process by the AppXchange partner. |
id | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timeStamp | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
realEstateAgencyId | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
personId | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mailAccountId | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
appClientKey | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
category* | AnnouncementCategorystring x-enumNames: List [ “Entity”, “Notification”, “EmailAccountChange”, “EmailPersonalChange”, “EventCenterChange”, “Voip”, “Authorization” ]Enum: Array [ 7 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
entityDetails | EntityDetails{
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
notificationDetails | NotificationDetails{
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
emailChangeDetails | EmailChangeDetails{
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
eventCenterChangeDetails | EventCenterChangeDetails{
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
voipDetails | VoipDetails{
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
authorizationDetails | AuthorizationDetails{
|
When creating a widget in Kolibri, you need to contact us. You need to provide the following data:
As stated before, you are notified a widget is required by Kolibri using a callback URL you specify. This callback URL contains 4 sections. The information they contain and what you need to do with those sections is now explained using the following example URL: https://yourcallbackurl.com?entityId={value}&realEstateAgencyId={value}&entityType={value}&validUntil={value}&signature={value}=&keyVersion={value}
In the previous chapter the signature and key version are mentioned. You are responsible for validating the request is a valid request. If it is not a valid request, a 401 status code must be returned. There are 2 ways to validate a request. The primary way, is using an endpoint to validate the request. The URL for this endpoint is https://sandbox-authorization.kolibri24.com/v1/ validateSignature for the sandbox environment and https://authorization.kolibri24.com/v1/ validateSignature for the production environment. To use this endpoint, you have to make a POST request (authorization tokens are not required) with the following JSON request object:
The Content-Type header must be set to: application/json.
If the request is correctly made, a response in the response body will be returned that looks like this:
isValid indicates if the signature is correct and the validUntil is still valid. If the response isValid is false, or the http status code does not indicate success (Bad request, Not found, Internal server Error etc), you are required to return a 401 Unauthorized. If it is valid (200 and isValid true), you may return the widget HTML.
On the live environment we require that the widget returns a 401 if the request is invalid. We test periodically if these requirements are met, and if not, the widget will be taken offline. Then, it can only be set online if het requirements are met (401 for invalid requests and a 200 with the widgets HTML if the request is correct). The sandbox environment does not enforce this. Meaning, you can test you widgets in Kolibri without having implemented the signature check.
If you want to test if your application successfully does these security checks in the sandbox environment, we can test this. Contact us and we will check it.
When your widget requires a more secure way of validating the request (not using our API to validate) you can contact us. We will provide you the public key that can be used to validate the signature on your side.
In the response headers for the widget, the x-frame-options must be set so that the widget can be displayed in an Iframe in the Kolibri24.com domain. The response header should look like this: