GET api/Telegram/GetActiveChatByPhone?phone={phone}&name={name}&source={source}
Получить активный чат
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| phone |
телефон |
string |
Required |
| name |
Имя чата или ключ |
string |
Required |
| source |
источник 0-ТГ 1-ЛК |
integer |
Required |
Body Parameters
None.
Response Information
Resource Description
ActiveChat| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | integer |
None. |
|
| Messages | Collection of MessageStructDto |
None. |
Response Formats
application/json, text/json
Sample:
{
"Id": 1,
"Messages": [
{
"Reactions": [
{
"Employee": 1,
"Emoji": "sample string 2"
},
{
"Employee": 1,
"Emoji": "sample string 2"
}
],
"Reply": {
"Id": 1,
"Name": "sample string 2",
"Message": "sample string 3"
},
"AdditionalKey": 1,
"Id": 2,
"Chat": 3,
"ChatId": 4,
"Created": "2026-02-04T02:09:21.7561449+00:00",
"Message": "sample string 6",
"From": "sample string 7",
"Phone": "sample string 8",
"EmployeeId": 1,
"MessageType": 0,
"Attachments": [
"sample string 1",
"sample string 2"
],
"Area": 9,
"ChannelId": 10,
"ReplyId": 11,
"Level": 12,
"Source": 0,
"State": 0
},
{
"Reactions": [
{
"Employee": 1,
"Emoji": "sample string 2"
},
{
"Employee": 1,
"Emoji": "sample string 2"
}
],
"Reply": {
"Id": 1,
"Name": "sample string 2",
"Message": "sample string 3"
},
"AdditionalKey": 1,
"Id": 2,
"Chat": 3,
"ChatId": 4,
"Created": "2026-02-04T02:09:21.7561449+00:00",
"Message": "sample string 6",
"From": "sample string 7",
"Phone": "sample string 8",
"EmployeeId": 1,
"MessageType": 0,
"Attachments": [
"sample string 1",
"sample string 2"
],
"Area": 9,
"ChannelId": 10,
"ReplyId": 11,
"Level": 12,
"Source": 0,
"State": 0
}
]
}
application/xml, text/xml
Sample:
<ActiveChat xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Data.Repositories.Telegram">
<Id>1</Id>
<Messages>
<MessageStructDto>
<Area>9</Area>
<Attachments xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>sample string 1</d4p1:string>
<d4p1:string>sample string 2</d4p1:string>
</Attachments>
<ChannelId>10</ChannelId>
<Chat>3</Chat>
<ChatId>4</ChatId>
<Created>2026-02-04T02:09:21.7561449+00:00</Created>
<EmployeeId>1</EmployeeId>
<From>sample string 7</From>
<Id>2</Id>
<Level>12</Level>
<Message>sample string 6</Message>
<MessageType>CloseChatMode</MessageType>
<Phone>sample string 8</Phone>
<ReplyId>11</ReplyId>
<Source>TGBot</Source>
<State>Message</State>
<AdditionalKey>1</AdditionalKey>
<Reactions>
<Reaction>
<Emoji>sample string 2</Emoji>
<Employee>1</Employee>
</Reaction>
<Reaction>
<Emoji>sample string 2</Emoji>
<Employee>1</Employee>
</Reaction>
</Reactions>
<Reply>
<Id>1</Id>
<Message>sample string 3</Message>
<Name>sample string 2</Name>
</Reply>
</MessageStructDto>
<MessageStructDto>
<Area>9</Area>
<Attachments xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>sample string 1</d4p1:string>
<d4p1:string>sample string 2</d4p1:string>
</Attachments>
<ChannelId>10</ChannelId>
<Chat>3</Chat>
<ChatId>4</ChatId>
<Created>2026-02-04T02:09:21.7561449+00:00</Created>
<EmployeeId>1</EmployeeId>
<From>sample string 7</From>
<Id>2</Id>
<Level>12</Level>
<Message>sample string 6</Message>
<MessageType>CloseChatMode</MessageType>
<Phone>sample string 8</Phone>
<ReplyId>11</ReplyId>
<Source>TGBot</Source>
<State>Message</State>
<AdditionalKey>1</AdditionalKey>
<Reactions>
<Reaction>
<Emoji>sample string 2</Emoji>
<Employee>1</Employee>
</Reaction>
<Reaction>
<Emoji>sample string 2</Emoji>
<Employee>1</Employee>
</Reaction>
</Reactions>
<Reply>
<Id>1</Id>
<Message>sample string 3</Message>
<Name>sample string 2</Name>
</Reply>
</MessageStructDto>
</Messages>
</ActiveChat>