สำหรับเอเจนต์ AI: markdown ของหน้านี้ — /docs-content-en/posts/comments/read.md ดัชนีเอกสาร — /llms.txt
บทความในเอกสารมีให้บริการเป็นภาษาอังกฤษในขณะนี้
Read user comments
Defaults to the current user. Only a Bitrix24 admin can choose another user; Bitrix24 leaves text blank in that mode. firstId takes precedence over lastId; both use the feed comment ID.
GET /v1/posts/comments
Bitrix24: log.blogcomment.user.get | Scope: log | Auth: X-Api-Key
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| userId | integer | no | Positive user ID; defaults to the current user |
| firstId | integer | no | Feed comment cursor; 0 allowed; takes precedence over lastId |
| lastId | integer | no | Feed comment cursor for older entries; 0 allowed |
| limit | integer | no | Default 100, positive; clamped to 1000 |
Response fields
data.comments[]: id (feed), commentId (blog), postId, date, text, attach (file IDs). data.files is either an array or a dictionary keyed by numeric file IDs. Each file contains only the optional fields below; unknown fields are omitted and credential-bearing URLs are redacted.
| Field | Type | Description |
|---|---|---|
| id | integer | Disk file ID |
| date | string | File timestamp |
| type | string | File type |
| name | string | File name |
| size | number | File size in bytes |
| image | false or object |
Image metadata; the object contains optional width and height numbers |
| authorId | integer | Author user ID |
| authorName | string | Author display name |
| urlPreview | string or null |
Preview URL |
| urlShow | string | Display URL |
| urlDownload | string | Redacted upstream download URL; metadata only, not a callable API URL |
The array form preserves file positions. The dictionary form uses positive numeric file IDs as keys. files: [] and files: {} remain valid empty forms; image: false and urlPreview: null are preserved.
urlShow and urlDownload are upstream metadata only. They may be redacted and must not be replayed as API URLs. This log endpoint does not provide a file-download operation. The timeline download endpoint (GET /v1/timelines/{commentId}/files/{fileRef}/download) requires the crm scope and a timeline comment ID; the feed id returned here is not interchangeable with that commentId.
{
"success": true,
"data": {
"comments": [],
"files": []
}
}
Examples
curl -X GET "https://vibecode.bitrix24.com/v1/posts/comments" -H "X-Api-Key: vibe_api_DUMMY_personal"
curl -X GET "https://vibecode.bitrix24.com/v1/posts/comments" -H "X-Api-Key: vibe_app_DUMMY_oauth" -H "Authorization: Bearer DUMMY_SESSION"
const response = await fetch("https://vibecode.bitrix24.com/v1/posts/comments", {
method: "GET", headers: { "X-Api-Key": "vibe_api_DUMMY_personal" }
});
const result = await response.json();
const response = await fetch("https://vibecode.bitrix24.com/v1/posts/comments", {
method: "GET", headers: { "X-Api-Key": "vibe_app_DUMMY_oauth", "Authorization": "Bearer DUMMY_SESSION" }
});
const result = await response.json();
Errors
| HTTP | Code | Meaning |
|---|---|---|
| 400 | INVALID_PARAMS | Invalid input; no Bitrix24 call |
| 401 | TOKEN_MISSING / INVALID_API_KEY | Missing tokens or unusable key |
| 403 | SCOPE_DENIED / BITRIX_ACCESS_DENIED | Missing scope, portal permission refusal, or forbidden write |
| 422 | BITRIX_ERROR | Portal business refusal or unsuccessful operation |
| 429 | BITRIX_RATE_LIMIT | Portal rate limit |
| 502 / 503 | BITRIX_ERROR | Invalid response, unavailable portal or timeout |
400: invalid input.
{"success":false,"error":{"code":"INVALID_PARAMS","message":"Invalid parameter"}}
Which ID to use
| Field | Endpoint |
|---|---|
| id (feed log comment) | DELETE /v1/feed-comments/:id |
| commentId (blog comment) + postId | DELETE /v1/posts/:id/comments/:commentId |