authorIdString|Number
Specifies the unique identifier of the current user. If not set, a GUID will be generated automatically. This determines which messages are displayed as "own messages" (right-aligned) versus "other messages" (left-aligned).
Example
<div id="chat"></div>
<script>
let messagesData = [
{
id: 1,
text: "Hello from John!",
authorId: "user-123",
authorName: "John Doe",
authorImageUrl: "https://demos.telerik.com/kendo-ui/content/web/Customers/RICSU.jpg",
timestamp: new Date(2026, 0, 1, 9, 0)
},
{
id: 2,
text: "Hi John! Nice to meet you.",
authorId: "user-456",
authorName: "Jane Smith",
authorImageUrl: "https://demos.telerik.com/kendo-ui/content/web/Customers/LONEP.jpg",
timestamp: new Date(2026, 0, 1, 9, 5)
}
];
$("#chat").kendoChat({
authorId: "user-123", // John's messages will appear as "own messages"
dataSource: messagesData
});
</script>
In this article