މެޓާ އެންޑް އިންސްޓަގްރާމް އެޕީއައި އިންޓަގްރޭޝަން
އެސްއެމްއެސްބީއޭޓީ ޗެޓްހަބް ޕްލެޓްފޯމް ގައި އިންސްޓަގްރާމް އެޕް އެއް ހެދުމަށް ރިފަރެންސް: އޮތެންޓިކޭޝަން، އިންސްޓަގްރާމް ޑައިރެކްޓް ވާހަކަ ދެއްކުމާއި، ޕޯސްޓްތަކާއި ރީލްސް އަށް ކޮމެންޓް ކުރުމާއި، ސްޓޯރީ ރިޕްލައި ކުރުމާއި، ވެބްހޫކް ކުރުމާއި، ޕޯލިންގ ކުރުމެވެ.
މަޞްދަރުތައް
މި ޕޭޖުގައި އިންޓަރނަލް މެޓާ ކޮމެންޓްސް އެޕީއައި ސްޕެސިފިކޭޝަން ލައިވް އޯޕަންއޭޕީއައި އާއި އެއްކޮށްލައެވެ
މާނަތައް https://chatapi.smsbat.com/swagger/v1/swagger.json ގައި އަދި
https://restapi.smsbat.com/swagger/v1/swagger.json އެވެ. ދެމީހުންގެ މެދުގައި ޚިޔާލުތަފާތުވާ ތަނެއްގައި، އެ…
ތަފާތަކީ އިންލައިންގައި ގޮވާލާފައި ހުޅުވާ ސުވާލުތައް ގެ ދަށުން ލިސްޓްކޮށްފައިވެއެވެ.
1. ބޭސް ޔޫއާރްއެލްސް
| މަޤްޞަދު | ޔޫއާރްއެލް |
|---|---|
| ޗެޓް އެޕީއައި + މެޓާ އެޕީއައި | https://chatapi.smsbat.com |
| ސްވެގަރ ޔޫއައި / އޯޕަންއެޕީ | https://chatapi.smsbat.com/index.html · …/swagger/v1/swagger.json |
| REST API (އޮގަނައިޒޭޝަންސް، ކޯލްބެކް ޔޫއާރްއެލްސް) | https://restapi.smsbat.com |
| ރެސްޓް އެޕީއައި ސްވެގަރ | https://restapi.smsbat.com/swagger/v1/swagger.json |
| އޮޕަރޭޓަރ ވެބް ޕެނަލް | https://chat.smsbat.com |
2. ތަސްދީގުކުރުން
އޮތު ސްކީމް ޑިޕެންޑް ކުރަނީ އެންޑްޕޮއިންޓް ގްރޫޕަށް އެވެ. އެތަކެތި އެއްކޮށްލުމަކީ 401 ޖެހުމަށް އެންމެ އާންމު ސަބަބެވެ.
| ގްރޫޕް | ސުރުޚީ |
|---|---|
chatapi.smsbat.com/api/meta/* (ޕޯސްޓް، ކޮމެންޓް) | X-Authorization-Key: <organization token> |
chatapi.smsbat.com/api/chat/*، /api/company/*، /api/operator/* | Authorization: Bearer <JWT> |
restapi.smsbat.com/* | X-Authorization-Key · Authorization: Bearer · އަސާސީ އޮތޯރިޓީ |
X-Authorization-Key އަށް އޯގަނައިޒޭޝަން ޓޯކަން ދޫކުރަނީ ޕްރޮފައިލް ގެ ދަށުން ޕެނަލްގައެވެ.
ކުންފުންޏާއި އޮޕަރޭޓަރުގެ ޖޭޑަބްލިޔުޓީ އަންނަނީ /api/company/get-token އަދި /api/operator/get-token އިންނެވެ.
ތަފާތުވުން
chatapi އޯޕަންއޭޕީއައި ޑޮކިއުމަންޓުން އެއް ސެކިއުރިޓީ ސްކީމެއް — Bearer — ޑިކްލެއާކޮށް އެ ސްކީމް ތަންފީޒުކުރެއެވެ
ދުނިޔޭގެ ފެންވަރުގައި. X-Authorization-Key އެތަނުގައި އެއްގޮތަކަށްވެސް އިޢުލާން ނުކުރެވުނު ނަމަވެސް، އެތެރޭގެ މެޓާ
ކޮމެންޓްސް އެޕީއައި ސްޕެސިފިކޭޝަން އިން ނަން ދީފައިވަނީ /api/meta/* އަށެވެ. އެއީ ބޮޑަށް ބެލެވެނީ ޙައްލުކުރަނީ…
ސްވެގަރ އިން ނުފެންނަ މީޑިލްވޭއަރ އެވެ. ޝިޕް ކުރުމުގެ ކުރިން ތަޖުރިބާގެ ގޮތުން ކޮންފަރމް ކުރާށެވެ.
2.1 ކުންފުނީގެ ޓޯކަން
POST https://chatapi.smsbat.com/api/company/get-token
Content-Type: application/json
{ "login": "company_login", "password": "company_password" }
200 OK ރިޓަރން ކުރަނީ ބެއާ ޓޯކަން ސްޓްރިންގް އެކެވެ.
2.2 ޖަމިއްޔާތައް
GET https://chatapi.smsbat.com/api/company/organization
Authorization: Bearer <company_token>
[ { "id": 24, "name": "My Instagram Store" } ]
2.3 އޯގަނައިޒޭޝަނެއްގައި އޮޕަރޭޓަރުން
GET https://chatapi.smsbat.com/api/operator?organizationId=24
Authorization: Bearer <company_token>
[
{
"id": 21,
"name": "Jane Doe",
"status": 0,
"organization": { "id": 24, "name": "My Instagram Store" }
}
]
އޮޕަރޭޓަރުގެ ޙާލަތްތައް: 0 އެކްޓިވް، 1 އިންއެކްޓިވް، 2 ޑިލީޓް ކުރެވިފައިވާ.
2.4 އޮޕަރޭޓަރުން އިތުރުކުރުން / ސިންކްރޮނައިޒްކުރުން
POST https://chatapi.smsbat.com/api/operator/synchronize
Authorization: Bearer <company_token>
Content-Type: application/json
[ { "organizationId": 24, "name": "John Operator" } ]
200 OK → [ { "id": 21, "status": 0, "name": "John Operator" } ]
2.5 އޮޕަރޭޓަރ ޖޭޑަބްލިޔުޓީ
POST https://chatapi.smsbat.com/api/operator/get-token
Authorization: Bearer <company_token>
Content-Type: application/json
{ "id": 21, "expiresAt": "2026-12-31T23:59:59.000Z" }
200 OK ޖޭޑަބްލިޔުޓީ ރިޓަރން ކުރަނީ ސްޓްރިންގެއްގެ ގޮތުގައެވެ.
2.6 އޮޕަރޭޓަރ ޓޯކަން އެއް ސައްހަކުރުން
POST https://chatapi.smsbat.com/api/operator/validate-token
Authorization: Bearer <company_token>
Content-Type: application/json
"eyJhbGciOi..."
{
"isValid": true,
"operatorId": 21,
"clientId": 0,
"expiresAt": "2026-12-31T23:59:59.000Z",
"error": null
}
ބާތިލް ވަގުތު: { "isValid": false, "error": "Invalid token" }.
2.7 އޮޕަރޭޓަރ ޗެޓް ޕެނަލް އެންބެޑް ކުރުން
<script type="module" id="operator-chat-panel-script"
src="https://widget.smsbat.com/operator-chat-panel/widget-script.js"
token="YOUR_OPERATOR_JWT_TOKEN"></script>
3. ޗެޓް ޕެނަލް އަށް ޑީޕްލިންކްސް ކުރުން
ބޭރު ނިޒާމަކުން (ސީއާރުއެމް، އީއާރްޕީ، ވެބްސައިޓް) ވަކި ވާހަކައެއް ހުޅުވާލެވޭނެ އިން…
https://chat.smsbat.com/ އެވެ. އޮޕަރޭޓަރަށް ހުއްދަ ލިބިފައިވަނީ ކިއުއަރީ ޕެރެމިޓަރެއްގެ ގޮތުގައި ފާސްކޮށްފައިވާ ޖޭޑަބްލިޔުޓީއަކުންނެވެ.
https://chat.smsbat.com/?chat_raw_id=<chat_id>&token=<jwt>
https://chat.smsbat.com/?phone=<phone>&token=<jwt>
https://chat.smsbat.com/?from=<bm_id>&phone=<phone>&token=<jwt>
https://chat.smsbat.com/?source=7&from=<bm_id>&phone=<phone>&token=<jwt>
| ޕެރެމިޓަރ | ތަފްސީލު |
|---|---|
chat_raw_id | ޗެޓް އައިޑީ |
phone | ބައިނަލްއަޤްވާމީ ފޯމެޓުގައި ފޯނު ނަންބަރު |
from | ބްރޭންޑް / ވިޔަފާރި އެކައުންޓް އައިޑެންޓިފައިޓަރ (bm_id) |
source | ޗެޓް ސޯސް — އިންސްޓަގްރާމް އަށް 7، §8.1 |
token | ޗެޓްތަކަށް އެކްސެސް ލިބިފައިވާ ސައްހަ، މުއްދަތު ހަމަނުވާ އޮޕަރޭޓަރ ޖޭޑަބްލިޔުޓީ |
ސައްހަ ނޫން ޖޭޑަބްލިޔުޓީއަކުން ވިޒިޓާ އޮޕަރޭޓަރ ޕެނަލްގެ ލޮގިން ސްކްރީނަށް ލޭންޑް ކުރެއެވެ.
4. އިންސްޓަގްރާމް ސީދާ ވާހަކަ ދެއްކުން
4.1 ޗެޓްތައް ލިސްޓްކުރުން
GET https://chatapi.smsbat.com/api/chat/chats?source=7&page=1&per_page=20
Authorization: Bearer <token>
Note
މިތަނުގައި ޕޭޖިނޭޝަން އަކީ per_page (snake_case) އެވެ. /api/meta/* ގެ ދަށުން އަދި ވޯޓުލުން
އެންޑްޕޮއިންޓަކީ perPage (camelCase) އެވެ. މިއީ ޓައިޕޯއެއް ނޫން — އެޕީއައި އިން މިދެކަންތައްވެސް ބޭނުންކުރެއެވެ.
ކިއުއަރީ ޕެރެމިޓަރސް، ހުރިހާ ކަމެއް އިޚްތިޔާރީ:
| ޕެރެމިޓަރ | ވައްތަރު | ތަފްސީލު |
|---|---|---|
source | ChatSource | 7 އިންސްޓަގްރާމަށް ނަތީޖާ ހަނިކުރަނީ |
entityId | int | ވިޔަފާރި އެކައުންޓް އައިޑީ. ހަމައެކަނި އުނގުޅާނީ source |
instagram_user_id | int | ޗެޓްހަބްގައި އިންސްޓަގްރާމް ޔޫޒަރ އައިޑީ |
facebook_user_id | int | ޗެޓްހަބްގައި ފޭސްބުކް ޔޫޒަރ އައިޑީ |
page / per_page | int | ޕޭޖިނޭޝަން، ޑިފޯލްޓް 1 / 20 |
status | ChatStatus[] | ޗެޓް ސްޓޭޓަސް، ރިޕީޓެބަލް |
search | string | ހިލޭ ޓެކްސްޓް ހޯދުން (ނަން، ފޯނު، …) |
organizationId | int | އޯގަނައިޒޭޝަން އައިޑީ |
operatorId | int[] | ޙަވާލުކުރެވިފައިވާ އޮޕަރޭޓަރުން ފިލްޓަރ ކުރުން |
date | string[] | ދެ ޙައްދެއް: ?date=…&date=… |
isChain | bool | ޗެޓްތައް ޗޭންގެ ގޮތުގައި އަނބުރާ ގެނެސް، ކުރީގެ ޗެޓްތަކުން މެސެޖުތައް ގެންގުޅެން |
isUnread، starMark، isOperator، isAIAgent | bool | އިތުރު ފިލްޓަރުތައް |
phone، email، contactId، clientId، tagIds، rate، sortedBy | — | އެހެން ފިލްޓަރުތައް |
200 OK ރިޓަރންސް GetChatsResponse:
{
"total": 1,
"newMessagesCount": 2,
"items": [
{
"id": 1867,
"theme": null,
"messSource": 7,
"chatStatus": 1,
"countUnread": 2,
"metaUserId": "1585775752382460",
"instaAccount": { "id": 12, "name": "my_instagram_shop", "photo": "https://..." },
"instagramUser": { "id": 123, "name": "marianna_cat", "photo": "https://..." },
"operator": { "id": 21, "name": "Jane", "photo": "https://..." },
"client": { "id": 55, "name": "Marianna", "photo": null },
"textLastMess": "Hello! Is this product available?",
"timeLastMess": "2026-08-13T10:15:00Z",
"authorLastMessage": 1,
"messageStatus": 6,
"isMedia": false,
"phone": null,
"organizationId": 1,
"createdAt": "2026-08-13T10:14:00Z",
"isStarred": false,
"isBlocked": false,
"tags": []
}
]
}
އިންސްޓަގްރާމް އެޕް އަކަށް މުހިންމު ދާއިރާތައް:
| ދަނޑު | މާނަ |
|---|---|
instaAccount | އެ އިންސްޓަގްރާމް ވިޔަފާރި އެކައުންޓް (ފިހާރަ) އެވެ. id އަކީ entityId ފިލްޓަރ ވެލިއު އެވެ؛ name އަކީ މެޓާ |
instagramUser | އެ ކަސްޓަމަރ އެވެ. name އަކީ އިންސްޓަގްރާމް ހެންޑްލް، id އަކީ instagram_user_id ފިލްޓަރ ވެލިއު |
metaUserId | ކަސްޓަމަރުގެ ސްކޯޕްޑް އައިޑީ މެޓާގެ ފަރާތުން (ސްޓްރިންގް) |
messSource | އިންސްޓަގްރާމް އަށް 7 |
phone | އާންމުކޮށް އިންސްޓަގްރާމް އަށް null — ތަޅުދަނޑިއެއްގެ ގޮތުގައި ބޭނުން ނުކުރައްވާ |
ChatDTO ވެސް ގެންދަނީ olxUser، promUser، waba، rozetkaUser، facebookAccount، .
facebookUser، viberAccount، tgBot، tgUser، viberBot، viberBotUser، widget،
media، isConnectedAI، isPromo، rate، rateComment، closedBy، draft، lang،
starMark، contactId، contactName، block، isInStopList، stopList،
isSmsFallbackEnabled އަދި taggedMessages އެވެ.
4.2 ޗެޓް މެސެޖުތައް
GET https://chatapi.smsbat.com/api/chat/chats/1867/messages?isChain=false
Authorization: Bearer <token>
200 OK އިން ChatMessageDTO ގެ އެރޭއެއް ރިޓަރން ކުރާނެއެވެ:
[
{
"id": 9928,
"chatId": 1867,
"message": "Hi! Do you have size M in stock?",
"messageTranslation": null,
"phone": null,
"author": 1,
"source": 7,
"media": null,
"replyTo": null,
"status": 6,
"date": "2026-08-13T10:14:00Z",
"operator": null,
"client": { "id": 123, "name": "marianna_cat", "photo": "https://..." },
"messageType": 0,
"isInternal": false,
"isBroadcast": false,
"starMark": false,
"referralGuid": null,
"postId": null,
"isConnectedAI": false,
"organizationId": 1,
"countUnreadMessages": 0
}
]
postId ޕޮޕިއުލޭޓް ކުރެވެނީ މެސެޖު އިންސްޓަގްރާމް ޕޯސްޓަކާ ނުވަތަ ސްޓޯރީއަކާ ގުޅޭ ވަގުތުތަކުގައި — ޕާސް ކޮށްލާށެވެ
ސީދާ ފަހަތަށް id / postId ގެ ގޮތުގައި މެޓާ އެޕީއައި އަށް ވަދެވޭނެއެވެ. media އަކީ ChatMediaDTO:
{ name, format, type, uri, raw, length, isUploaded } އެވެ.
4.3 މެސެޖެއް ފޮނުވުން (ޖޭއެސްއޯއެން)
POST https://chatapi.smsbat.com/api/chat/1867/message
Authorization: Bearer <token>
Content-Type: application/json
ހަށިގަނޑު — SendChatMessageDTO:
{
"textMessage": "Hello! Yes, size M is available.",
"author": 0,
"isInternal": false,
"replyToMessageId": 9928,
"appGuid": "550e8400-e29b-41d4-a716-446655440000",
"media": {
"name": "item.jpg",
"format": "image/jpeg",
"dataBase64": "/9j/4AAQSkZJRg...",
"type": 1
}
}
| ދަނޑު | ވައްތަރު | ތަފްސީލު |
|---|---|---|
textMessage | string? | މެސެޖް ޓެކްސްޓް. media ހުންނައިރު ހުސްވެދާނެ |
author | AuthorMessage? | 0 އޮޕަރޭޓަރ، 1 ކްލައިންޓް |
isInternal | bool? | true ފާހަގަކުރަނީ ކަސްޓަމަރަށް ޑެލިވަރީ ނުކުރެވޭ އެތެރޭގެ ނޯޓެއް |
replyToMessageId | int? | އަށް ޖަވާބު ދެމުންދާ މެސެޖުގެ އައިޑީ |
appGuid | uuid? | ރިފަރަލް ޖީއައިޑީ |
media | MediaDTO? | { name, format, dataBase64, thumbnail, duration, type } |
200 OK → { "id": 9930, "messageStatus": 0 }
އަދި ރިފަރަލް ޖީއައިޑީއެއް ވެސް މި މަގުގައި ފާސްކުރެވިދާނެއެވެ:
POST /api/chat/{chatId}/{referralGuid}/message (އެފަދައިން …/message/v1، …/message/v2) އެވެ.
4.4 ފައިލް ނުވަތަ ވީޑިއޯއެއް ފޮނުވުން (މަލްޓިޕާޓް، v2)
POST https://chatapi.smsbat.com/api/chat/1867/message/v2
Authorization: Bearer <token>
Content-Type: multipart/form-data
:::warning{title=""ފޯމް ފީލްޑް ނަންތަކަކީ ޑޮޓް ނޯޓޭޝަން އާއި އެކު ޕަސްކަލްކޭސް” އެވެ.”}
textMessage އަދި media.file އަށް ހިމޭންކަމާއެކު އަޅާނުލާ ތިބެއެވެ. ތިރީގައިވާ ސީދާ ނަންތައް ބޭނުން ކުރާށެވެ.
:::
| ފޯމް ދާއިރާ | ވައްތަރު | ތަފްސީލު |
|---|---|---|
TextMessage | string | މެސެޖް ޓެކްސްޓް |
Author | int | 0 އޮޕަރޭޓަރ، 1 ކްލައިންޓް |
IsInternal | bool | އެތެރޭގެ ނޯޓް |
ReplyToMessageId | int | މެސެޖަކަށް ޖަވާބު ދެމުންދަނީ |
AppGuid | uuid | ރިފަރަލް ޖީއައިޑީ |
Media.File | binary | ޚުދު ފައިލް ވެސް |
Media.Name | string | ފައިލް ނަން |
Media.Format | string | މައިމް ވައްތަރު (video/mp4، image/png، application/pdf) |
Media.Type | MediaType | §8.5 |
Media.DataBase64 | string | Media.File އަށް ބަދަލު |
Media.Thumbnail | string | Base64 ވީޑިއޯ ޕްރިވިއު ފްރޭމް |
Media.Duration | double | ވީޑިއޯގެ މުއްދަތު ސިކުންތުކޮޅެއްގެ ތެރޭގައި |
curl -X POST "https://chatapi.smsbat.com/api/chat/1867/message/v2" \
-H "Authorization: Bearer <token>" \
-F "TextMessage=Here is the price list" \
-F "Author=0" \
-F "Media.Type=2" \
-F "Media.File=@./price.pdf"
200 OK → { "id": 9931, "messageStatus": 0 }
4.5 ޗެޓް ސްޓޭޓަސް ބަދަލުކުރުން
PUT https://chatapi.smsbat.com/api/chat/status
Authorization: Bearer <token>
Content-Type: application/json
{ "id": 1867, "status": 4 }
200 OK އަޕްޑޭޓް ކުރެވިފައިވާ އެއްޗެއް ގުގުމާލައެވެ.
4.6 މެސެޖް ސްޓޭޓަސްތައް އަޕްޑޭޓްކުރުން
PUT https://chatapi.smsbat.com/api/chat/messages/status
Authorization: Bearer <token>
Content-Type: application/json
{ "status": 3, "messageIds": [9928, 9929] }
4.7 ޗެޓެއް ޑިލީޓްކުރުން
DELETE https://chatapi.smsbat.com/api/chat/chats/1867
Authorization: Bearer <token>
5. ޕޯސްޓްތަކާއި ރީލްތަކާއި ވާހަކަތައް
ބޭސް މަގު: https://chatapi.smsbat.com/api/meta
ލިޔުން: X-Authorization-Key: <organization token>
5.1 ލިސްޓް ޕޯސްޓްތަކާއި، ރީލްތަކާއި، ވާހަކަތައް
GET https://chatapi.smsbat.com/api/meta/posts?platform=instagram&mediaType=story&page=1&perPage=20
X-Authorization-Key: <token>
| ޕެރެމިޓަރ | ވައްތަރު | ބޭނުންވާ | ތަފްސީލު |
|---|---|---|---|
page | int | ނޫން | ޞަފްޙާ، ޑިފޯލްޓް 1 |
perPage | int | ނޫން | ކޮންމެ ޞަފްޙާއަކަށް ތަކެތި، ޑިފޯލްޓް 20 |
id | int | ނޫން | އިންޓަރނަލް ޕޯސްޓް އައިޑީ އިން ފިލްޓަރ ކުރުން |
platform | string | ނޫން | instagram ނުވަތަ facebook |
mediaType | string | ނޫން | post، reel ނުވަތަ story އެވެ. ހުރިހާ ބާވަތެއް ދޫކޮށްލާއިރު |
# Every post
curl -H "X-Authorization-Key: <token>" \
"https://chatapi.smsbat.com/api/meta/posts?page=1&perPage=10"
# Instagram only
curl -H "X-Authorization-Key: <token>" \
"https://chatapi.smsbat.com/api/meta/posts?platform=instagram"
# A single post by ID
curl -H "X-Authorization-Key: <token>" \
"https://chatapi.smsbat.com/api/meta/posts?id=42"
# Instagram Stories only
curl -H "X-Authorization-Key: <token>" \
"https://chatapi.smsbat.com/api/meta/posts?platform=instagram&mediaType=story"
200 OK:
{
"total": 42,
"items": [
{
"id": 42,
"metaId": "18113450675314072",
"text": "Check out our new collection!",
"imageUrl": "https://dashboard.smsbat.com/api/meta/post/media/7d124c36-1711-4aa8-b21d-f6dbf8f347ef",
"platform": "instagram",
"mediaType": "story",
"createdAt": "2026-07-22T09:35:30Z",
"story": {
"id": 42,
"metaId": "18113450675314072",
"url": "https://dashboard.smsbat.com/api/meta/post/media/7d124c36-1711-4aa8-b21d-f6dbf8f347ef"
}
}
]
}
:::warning{title=""ތަފާތުވުން — ކައުންޓަރ ފީލްޑް ނަން”.”}
ސްވެގަރ ސްކީމާ MetaCommentPostListItemDtoPaginationDTO އިން total މާނަކުރެއެވެ. އެ…
އެތެރޭގެ ސްޕެސިފިކޭޝަން ލިޔެކިޔުންތައް totalCount. ސްވެގަރ ޖެނެރޭޓް ކުރެވެނީ ކޯޑުން ކަމުން…
total އަކީ މާ ބޮޑަށް ބެލެވޭ ހަގީގަތެވެ. މިކަން ހަމަޖެހެންދެން total ?? totalCount ޕާރސް ކުރާށެވެ.
:::
| ދަނޑު | ތަފްސީލު |
|---|---|
id | އެތެރޭގެ ޕޯސްޓް އައިޑީ |
metaId | އެކްސްޓަރނަލް ޕޯސްޓް / ރީލް / ސްޓޯރީ އައިޑީ އިން މެޓާ |
text | ޕޯސްޓް ކެޕްޝަން |
imageUrl | ޕްރޮކްސީ މީޑިއާ ޔޫއާރްއެލް ކީޑް ކޮށްފައިވަނީ ނޮން-ސިކުއެންޝަލް MetaPost.Guid، ނުވަތަ null |
platform | facebook ނުވަތަ instagram |
mediaType | post، reel ނުވަތަ story |
createdAt | އުފެއްދި ތާރީޚު (ޕްލެޓްފޯމް ތާރީޚު، ނުވަތަ ޑޭޓާބޭސް ތާރީޚު) |
story | ޕްރެޒެންޓް އެކަނި އަށް mediaType: "story" |
story.id | އެތެރޭގެ ވާހަކަ އައިޑީ؛ އެއްވަރު post.id |
story.metaId | އެކްސްޓަރނަލް ސްޓޯރީ އައިޑީ އިން މެޓާ |
story.url | ރައްކާކުރެވިފައިވާ ސްޓޯރީ މީޑިއާގެ ސްޓޭބަލް ޕްރޮކްސީ ޔޫ.އާރ.އެލް؛ null މީޑިއާ ސޭވް ނުކުރެވުނު ނަމަ |
ޕޯސްޓް މީޑިއާ އަށް ޚިދުމަތް ދެނީ ދެ މަގުންނެވެ: GET /api/meta/post/media/{id:int} ފަހަތަށް ޖެހުމަށް
ކޮމްޕެޓިބިލިޓީ އަދި GET /api/meta/post/media/{guid:guid}. އައު އެޕީއައި ރެސްޕޮންސްތަކާއި ކޯލްބެކްސްތައް
އަބަދުވެސް ޖީއައިޑީ ފޯމް ޖެނެރޭޓް ކުރާށެވެ.
5.2 ކޮމެންޓްތައް ލިސްޓްކުރުން
GET https://chatapi.smsbat.com/api/meta/comments?platform=instagram&postId=42&page=1&perPage=20
X-Authorization-Key: <token>
| ޕެރެމިޓަރ | ވައްތަރު | ބޭނުންވާ | ތަފްސީލު |
|---|---|---|---|
page | int | ނޫން | ޞަފްޙާ، ޑިފޯލްޓް 1 |
perPage | int | ނޫން | ކޮންމެ ޞަފްޙާއަކަށް ތަކެތި، ޑިފޯލްޓް 20 |
postId | int | ނޫން | ޕޯސްޓް އައިޑީ އިން ފިލްޓަރ ކުރާށެވެ |
parentCommentId | int | ނޫން | ދީފައިވާ ކޮމެންޓެއްގެ ކުޑަކުދިންގެ ކޮމެންޓް (ޖަވާބު) |
platform | string | ނޫން | facebook ނުވަތަ instagram |
200 OK:
{
"total": 100,
"items": [
{
"id": 5,
"metaId": "179000000000005",
"text": "What is the price?",
"createdAt": "2026-04-15T10:30:00Z",
"platform": "instagram",
"replyStatus": null,
"author": {
"type": "meta_user",
"name": "John Doe",
"metaUserId": "1585775752382460"
},
"post": {
"id": 1,
"metaId": "18113450675314072",
"text": null,
"imageUrl": "https://dashboard.smsbat.com/api/meta/post/media/7d124c36-…",
"createdAt": "2026-07-22T09:35:30Z",
"mediaType": "story",
"story": {
"id": 1,
"metaId": "18113450675314072",
"url": "https://dashboard.smsbat.com/api/meta/post/media/7d124c36-…"
}
},
"mediaUrl": "https://chatapi.smsbat.com/api/meta/comment/media/5",
"replyTo": {
"id": 3,
"metaId": "179000000000003",
"text": "Parent comment..."
}
}
]
}
| ދަނޑު | ތަފްސީލު |
|---|---|
id | އެތެރޭގެ ކޮމެންޓް އައިޑީ |
metaId | މެޓާގައި އެކްސްޓަރނަލް އައިޑީ. null އަޅުގަނޑުމެންގެ ޕެންޑިންގ ރިޕްލައިއަށް ފޮނުވަންދެން |
text | ކޮމެންޓް ޓެކްސްޓް |
createdAt | އުފެއްދި ތާރީޚް |
platform | facebook ނުވަތަ instagram |
replyStatus | null އިންބައުންޑް ޔޫޒަރ ކޮމެންޓަކަށް؛ "pending" / "sent" / "failure" އަޅުގަނޑުމެންގެ ޖަވާބަށް |
author.type | "meta_user" ބޭރުގެ ޔޫޒަރ، "owner" ޕޭޖް އޯނަރ |
author.name | ލިޔުންތެރިޔާގެ ނަން |
author.metaUserId | މެޓާގައި ސްކޯޕްޑް ޔޫޒަރ އައިޑީ؛ null އަށް "owner" |
post | އެ ޕޯސްޓް، ރީލް ނުވަތަ ސްޓޯރީ އެ ކޮމެންޓް ނިސްބަތްވަނީ |
post.mediaType | post، reel ނުވަތަ story |
post.story | ވާހަކައަށް ރިފަރެންސް { id, metaId, url }, ވާހަކަތައް އެކަނި |
mediaUrl | މީޑިއާ އެޓޭޗްކޮށްފައިވަނީ ކޮމެންޓަށް، ނުވަތަ null |
replyTo | ބެލެނިވެރިންގެ ކޮމެންޓް { id, metaId, text }؛ null މަތީ ފެންވަރުގައި |
:::warning{title=""ތަފާތުވުން — ވައްތަރުގެ author.type”.”}
އެތެރޭގެ ސްޕެސިފިކޭޝަންގައި "meta_user" / "owner" ސްޓްރިންގްސް ޑޮކިއުމަންޓް ކުރެވެއެވެ. ސްވެގަރ ވައްތަރުތަކެވެ
MetaCommentAuthorType އަކީ enum [0, 1] އާއެކު އިންޓިޖަރ އެއްގެ ގޮތުގައެވެ. އޭ JsonStringEnumConverter
އެ ފަރަގު ހާމަކޮށްދޭނެ ކަމަށާއި ނަމަވެސް އެކަން ހަގީގީ ޖަވާބަކާ ދެކޮޅަށް ކަށަވަރުކޮށްދީފައެއް ނުވެ އެވެ. ލިޔުއްވާ އ
އެދެކަންތައް ވެސް ބަލައިގަންނަ ޕާސަރެވެ.
:::
5.3 ކޮމެންޓަކަށް ޖަވާބު ދިނުން
ޑެލިވަރީއަށް ޖަވާބެއް ކިއު ކުރެއެވެ.
curl -X POST \
-H "X-Authorization-Key: <token>" \
-H "Content-Type: application/json" \
-d '{"text": "Thanks for the feedback!"}' \
"https://chatapi.smsbat.com/api/meta/comments/5/reply"
ރިކުއެސްޓް ބޮޑީ: { "text": "Reply text" }
202 Accepted ކޮމެންޓް އޮބްޖެކްޓް — GET /api/meta/comments އާއި އެއް ބައްޓަމެއް — ރިޓަރން ކޮށްދެއެވެ
replyStatus: "pending" އަދި metaId: null އެވެ. ޑެލިވަރީގެ ނަތީޖާ އަންނަނީ ފަހުން ކ
source: 13 ކޯލްބެކް (§6.4) އެވެ.
ތަފާތުވުން — ޖަވާބު ކޯޑް
ސްވެގަރ ޑިކްލެއަރ ކުރަނީ 200 އެއްވެސް ހަށިގަނޑެއް ނެތި؛ އެތެރޭގެ ސްޕެސިފިކޭޝަންގައި ޑިކްލެއާ ކުރަނީ 202 Accepted .
ހަށިގަނޑެއްގެ ގޮތުގައި ކޮމެންޓާއެކު. ކޮންޓްރޯލަރ ގައި ގިނަ ފަހަރަށް ނެތް ProducesResponseType .
އެޓްރިބިއުޓް، ސްވެގަރ އޭގެ ޑިފޯލްޓްގައި ދޫކޮށްލާށެވެ. އެއްވެސް 2xx އެއް ބަލައިގަނެ ހަށިގަނޑަކަށް ބަރޯސާ ނުވާށެވެ.
6. ވެބްހޫކްސް
އެސްއެމްއެސްބީއޭޓީން application/json އާއެކު POST ރިކުއެސްޓްތައް ތިބާގެ ޔޫއާރްއެލްއަށް ފޮނުވައި، HTTP 200 އަނބުރާ ލިބޭނެ ކަމަށް އުންމީދު ކުރެއެވެ.
ނުލް ފީލްޑްތައް މުޅިން ދޫކޮށްލާފައި
null ގެ އަގު ހުންނަ ފީލްޑެއް އެއްގޮތަކަށްވެސް ކޯލްބެކް ބޮޑީއަށް ސިރިއަލައިޒް ނުކުރެވެއެވެ. އަށްޓަކައެވެ
ފޭސްބުކް ނުވަތަ އިންސްޓަގްރާމް އިން އައިސްފައި ނުވާ މެސެޖެއްގައި ފަސޭހައިން MetaUserId ކީއެއް ނެތެވެ.
“ނެތް” އާއި null އެއް އެއްޗެއްގެ ގޮތުގައި ބަލާށެވެ.
6.1 ކޯލްބެކް ޔޫ.އާރ.އެލް ރަޖިސްޓްރީ ކުރުން
curl -X POST 'https://restapi.smsbat.com/organizations/callback_urls' \
-H 'X-Authorization-Key: <token>' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://your-server.com/webhook",
"source": 12,
"headerName": "X-Webhook-Secret",
"headerValue": "your-secret",
"channelType": 7,
"channelEntityId": 12
}'
| ދަނޑު | ވައްތަރު | ތަފްސީލު |
|---|---|---|
url | string | ތިބާގެ ނިމުމެއް |
source | SendingSourceCallback | އިވެންޓް ޓައިޕް، §8.2 |
headerName / headerValue | string | އަޅުގަނޑުމެން ރިކުއެސްޓަށް އެޓޭޗް ކުރާ އަމިއްލައަށް އޮތޯ ހެޑަރ (އިޚްތިޔާރީ) |
channelType | ChatSource | ޗެނަލް. އިންސްޓަގްރާމް އަށް 7. އިޚްތިޔާރީ |
channelEntityId | int | ވަކި ވިޔަފާރި އެކައުންޓެއް. ބޭނުންވަނީ channelType |
channelType ނެތި ޔޫ.އާރ.އެލް އަށް ކޮންމެ ޗެނަލަކުން އިވެންޓްތައް ލިބެއެވެ.
Tip
ފުލް ކޮމެންޓް ކަވަރޭޖް އަށް ބޭނުންވަނީ ދެ ރެޖިސްޓްރޭޝަން: source: 12 އާ ކޮމެންޓްތަކަށް އަދި…
ޖަވާބު ސްޓޭޓަސްތަކަށް source: 13 ލިބޭނެއެވެ. ޑައިރެކްޓް އަދި ސްޓޯރީ ރިޕްލައިތަކަށް source: 3 އިތުރުކުރުން
(އަދި ކޮންމެ ޗެޓް މެސެޖެއް ބޭނުންނަމަ 11).
ބާކީ ހުރި އޮޕަރޭޝަންތައް:
GET https://restapi.smsbat.com/organizations/callback_urls?source=12
GET https://restapi.smsbat.com/organizations/callback_urls/{id}
PUT https://restapi.smsbat.com/organizations/callback_urls/{id}
DELETE https://restapi.smsbat.com/organizations/callback_urls/{id}
GET ރިޓަރންސް:
[
{
"id": 101,
"url": "https://your-server.com/webhook",
"source": 12,
"headerName": "X-Webhook-Secret",
"headerValue": "your-secret",
"createdAt": "2026-08-13T09:00:00Z",
"channelType": 7,
"channelEntityId": 12
}
]
6.2 އާ މެސެޖާއި އިންސްޓަގްރާމް ސްޓޯރީ ރިޕްލައި (source: 3, 11)
އިންސްޓަގްރާމް ސްޓޯރީ އަކަށް ޔޫޒަރަކު ދޭ ޖަވާބު މި ކޯލްބެކްތަކުގައި އާދައިގެ މެސެޖެއްގެ ގޮތުގައި އަންނަނީ،
އިތުރު މަތީ ފެންވަރުގެ Story ބްލޮކަކާއެކު:
{
"ChatId": 123,
"MessageId": 456,
"MessageText": "😍",
"Username": "Jane Smith",
"UserId": 789,
"MetaUserId": "1585775752382460",
"ShopId": 12,
"ShopName": "instagram shop name",
"Author": 0,
"type_messenger": 7,
"Story": {
"Id": 42,
"MetaId": "18113450675314072",
"Url": "https://dashboard.smsbat.com/api/meta/post/media/7d124c36-1711-4aa8-b21d-f6dbf8f347ef"
}
}
| ދަނޑު | ތަފްސީލު |
|---|---|
ChatId / MessageId | ޗެޓް އަދި މެސެޖް އައިޑެންޓިފައިޓަރސް |
Author | 0 ޔޫޒަރ، 1 އޮޕަރޭޓަރ |
Username | އިންސްޓަގްރާމް / ފޭސްބުކް ޑިސްޕްލޭ ނަން ނުވަތަ ހޭންޑްލް |
UserId | އެސްއެމްއެސްބީއޭޓީގައި އިންޓަރނަލް ނިއުމެރިކް ޔޫޒަރ އައިޑީ |
MetaUserId | މެޓާގައި ވާހަކަ ދައްކާ ބައިވެރިޔާގެ ސްކޯޕްޑް އައިޑީ. އައުޓްގޯއިން އޮޕަރޭޓަރ މެސެޖެއްގައި މިއީ އަދިވެސް ޗެޓްގެ މެޓާ ޔޫޒަރ ދެނެގަންނަނީ، އޮޕަރޭޓަރ |
ShopId | އިންސްޓަގްރާމް / ފޭސްބުކް ވިޔަފާރި އެކައުންޓްގެ އިންޓަރނަލް އައިޑީ |
ShopName | ކަނެކްޝަން ވަގުތު މެޓާ އިން ލިބުނު ގޮތަށް ވިޔަފާރި އެކައުންޓް ނަން |
MessageText | މެސެޖް ޓެކްސްޓް |
MessageMedia | މެސެޖަކީ މީޑިއާ |
type_messenger | މަސްދަރު، 7 އިންސްޓަގްރާމް އަށް |
operator_name | އޮޕަރޭޓަރުގެ ނަން Author = 1 |
Story | އިންބައުންޑް ސްޓޯރީ ރިޕްލައިއެއްގައި އެކަނި ޕްރެޒެންޓް |
Story.Id | އިންޓަރނަލް ސްޓޯރީ (MetaPost) އައިޑީ — ސީދާ މެޓާ އެޕީއައި ގައި id / postId ގެ ގޮތުގައި ބޭނުންކުރެވޭނެ |
Story.MetaId | އެކްސްޓަރނަލް ސްޓޯރީ އައިޑީ އިން މެޓާ |
Story.Url | ރައްކާކުރެވިފައިވާ ސްޓޯރީ މީޑިއާގެ ސްޓޭބަލް ޕްރޮކްސީ ޔޫ.އާރ.އެލް. މީޑިއާ ސޭވް ނުކުރެވުނު އިރު ނެތް — Story ބްލޮކާއި މެސެޖު އަދިވެސް ޑެލިވަރީ ކުރެވެނީ |
:::warning{title=""Author އަކީ ޗެޓް އެޕީއައި އަށް ނިސްބަތްކޮށް އިންވާޓް ކުރެވިފައިވާ އެއްޗެކެވެ”.”}
ChatMessageDTO.author ގައި 0 ގެ މާނައަކީ އޮޕަރޭޓަރ އަދި 1 ގެ މާނައަކީ ކްލައިންޓެވެ. މި ކޯލްބެކްގައި އެއީ…
އަނެއްކޮޅުން: 0 އަކީ ޔޫޒަރ، 1 އަކީ އޮޕަރޭޓަރ. މެޕިންގ ހިއްސާ ނުކުރައްވާށެވެ.
:::
6.3 އާ ކޮމެންޓް (source: 12)
މެޓާ ޔޫޒަރަކު ފޭސްބުކް ޕޯސްޓަކަށް ނުވަތަ އިންސްޓަގްރާމް ޕޯސްޓަކަށް / ރީލް އަށް ކޮމެންޓް ކުރުމުން ފަޔަރ ކުރެއެވެ.
Note
އިންސްޓަގްރާމް ވާހަކަ ޖަވާބުތައް source: 12 މެދުވެރިކޮށް ފޯރުކޮށްދެވޭކަށް ނެތެވެ. އެއީ އާދައިގެ ގޮތަކަށް އަންނަ އެއްޗެކެވެ
source: 3 އަދި/ނުވަތަ 11 ގައި އިންބައުންޑް މެސެޖުތައް Story ބްލޮކެއް އެކުލެވޭ ގޮތަށް — §6.2 ބައްލަވާށެވެ.
{
"type": "new_comment",
"platform": "instagram",
"comment": {
"id": 10,
"metaId": "179000000000010",
"parentCommentId": 5,
"parentMetaId": "179000000000005",
"parentCommentText": "The user's previous comment",
"text": "Great product!",
"createdAt": "2026-04-16T12:00:00Z",
"author": {
"type": "meta_user",
"name": "Jane Smith",
"metaUserId": "1585775752382460"
}
},
"post": {
"id": 1,
"metaId": "123456789012345",
"text": "Post description...",
"imageUrl": "https://dashboard.smsbat.com/api/meta/post/media/7d124c36-…",
"createdAt": "2026-04-10T12:00:00Z",
"mediaType": "post"
}
}
6.4 ކޮމެންޓް ރިޕްލައި ސްޓޭޓަސް (source: 13)
އަޅުގަނޑުމެން ޖަވާބެއް ދިނުމަށް މަސައްކަތް ކުރުމަށްފަހު، ކާމިޔާބުވިޔަސް ނުވަތަ ނާކާމިޔާބުވިޔަސް އަލިފާން ރޯވެއެވެ.
{
"type": "comment_status",
"platform": "instagram",
"comment": {
"id": 15,
"metaId": "179000000000015",
"parentCommentId": 10,
"parentMetaId": "179000000000010",
"parentCommentText": "Great product!",
"text": "Thanks for the feedback!",
"createdAt": "2026-04-16T12:05:00Z",
"updatedAt": "2026-04-16T12:05:03Z",
"replyStatus": "sent",
"author": {
"type": "owner",
"name": "Support Agent"
}
},
"post": {
"id": 1,
"metaId": "179999999999999",
"text": "Reel description...",
"imageUrl": "https://dashboard.smsbat.com/api/meta/post/media/7d124c36-…",
"createdAt": "2026-07-22T09:35:30Z",
"mediaType": "reel"
}
}
6.5 ޝެއަރޑް ކޮމެންޓް ކޯލްބެކް ފީލްޑްސް
ދެ ކޮމެންޓް ކޯލްބެކް ވެސް ހިއްސާކުރަނީ އެއް ހަށިގަނޑެއްގެ ބައްޓަން ކަމަށާއި ތަފާތުވަނީ ހަމައެކަނި type އިންނެވެ.
| ދަނޑު | ތަފްސީލު |
|---|---|
type | "new_comment" ނުވަތަ "comment_status" |
platform | "facebook" ނުވަތަ "instagram" |
comment.id | އެތެރޭގެ ކޮމެންޓް އައިޑީ |
comment.metaId | މެޓާގައި އެކްސްޓަރނަލް އައިޑީ؛ null ފޮނުވުމުގެ ކުރިން ޕެންޑިންގ ރިޕްލައިއަކަށް |
comment.parentCommentId | ބެލެނިވެރިންގެ ކޮމެންޓް އައިޑީ. މަތީ ފެންވަރުގެ ކޮމެންޓަކަށް ޣައިރު |
comment.parentMetaId | ބޭރު ބެލެނިވެރިންގެ ކޮމެންޓް އައިޑީ. މަތީ ފެންވަރުގައި ނެތް |
comment.parentCommentText | ބެލެނިވެރިންގެ ކޮމެންޓް ޓެކްސްޓް. މަތީ ފެންވަރުގައި ނެތް |
comment.text | ކޮމެންޓް ޓެކްސްޓް |
comment.createdAt | އުފެއްދި ތާރީޚް |
comment.updatedAt | އެންމެ ފަހުން އަޕްޑޭޓް ކުރިއެވެ. ދުވަހަކުވެސް ކޮމެންޓް އެޑިޓްކޮށްފައި ނުވާނަމަ ނެތް |
comment.replyStatus | "pending" / "sent" / "failure". އިންބައުންޑް ޔޫޒަރ ކޮމެންޓަކަށް ޣައިރު |
comment.author.type | "meta_user" ނުވަތަ "owner" |
comment.author.name | ލިޔުންތެރިޔާގެ ނަން |
comment.author.metaUserId | މެޓާގައި ސްކޯޕްޑް އޮތޯރ އައިޑީ. "owner" އަށް ހާޒިރުނުވާ |
comment.mediaUrl | ކޮމެންޓް މީޑިއާ. އެއްވެސް އެއްޗެއް ނެތް އިރު ޣައިރު ހާޒިރު |
post.id | އެތެރޭގެ ޕޯސްޓް އައިޑީ |
post.metaId | އެކްސްޓަރނަލް ޕޯސްޓް / ރީލް / ސްޓޯރީ އައިޑީ އިން މެޓާ |
post.text | ޕޯސްޓް ޓެކްސްޓް |
post.imageUrl | ޕޯސްޓް އިމޭޖް ޔޫއާރްއެލް، ނުވަތަ null |
post.createdAt | ޕޯސްޓް އުފެއްދި ތާރީޚް |
post.mediaType | ކޮމެންޓް ކޯލްބެކްތަކުގައި، ހަމައެކަނި post ނުވަތަ reel |
6.6 އާ ޗެޓް (source: 7)
{ "ChatId": 12345, "Phone": "+380501234567", "chat.Source": 7 }
6.7 މެސެޖާއި ޗެޓް ސްޓޭޓަސް ބަދަލުވުން (source: 6 / 5)
{ "name": "changed_message_status", "id": 9928, "status": 6 }
{ "name": "changed_chat_status", "id": 1867, "status": 4 }
6.8 މެސެޖް އެޑިޓް ނުވަތަ ޑިލީޓް (source: 9)
{ "messageId": 9930, "text": "Updated message text" }
{ "messageId": 9931, "delete": true }
6.9 ޓައިޕިންގ އިންޑިކޭޓަރ (source: 8)
{ "chat_id": 1867, "event": "start_typing", "operator_name": "Iryna" }
{ "chat_id": 1867, "event": "end_typing" }
7. އިވެންޓް ޕޯލިންގ
އިންބައުންޑް އެޗްޓީޓީޕީ ބަލައިނުގަނެވޭ މާހައުލުތަކަށެވެ.
7.1 އިވެންޓްތައް ގެނައުން
GET https://chatapi.smsbat.com/api/chat/callback-events?page=1&perPage=20
Authorization: Bearer <token>
| ޕެރެމިޓަރ | ތަފްސީލު |
|---|---|
organizationId | އިޚްތިޔާރީ. ދޫކޮށްލާއިރު ޓޯކަން އިން ނަގާފައިވާ |
page / perPage | ޕޭޖިނޭޝަން، ޑިފޯލްޓް 1 / 20 |
{
"page": 1,
"perPage": 20,
"total": 947,
"items": [
{
"ChatId": 1867,
"MessageId": 9928,
"MessageText": "Hello there!",
"MessageMedia": null,
"Phone": null,
"Username": "marianna_cat",
"UserId": 123,
"ShopId": 12,
"ShopName": "instagram shop name",
"Author": 1,
"type_messenger": 7,
"message_date": "2026-08-13T12:27:39.724Z",
"timestamp": "2026-08-13T12:27:39.736Z",
"event_guid": "ff60129e-c6e4-4876-9d90-badb430c0606",
"organization_id": 1,
"callback_type": "3"
}
]
}
ކޮންމެ އިވެންޓެއްގައިވެސް ގެންދަނީ event_guid، timestamp، organization_id އަދި callback_type — ކ
§8.2 ގައިވާ source އަގުތަކާ އެއްގޮތްވާ ސްޓްރިންގް. ބާކީ ހުރި ދާއިރާތައް ދިމާވަނީ އެއާ ގުޅޭ ދާއިރާތަކާއެވެ
§6 ގައިވާ ވެބްހޫކް އެވެ.
7.2 ޕްރޮސެސް ކުރެވިފައިވާ އިވެންޓްތައް ގަބޫލުކުރުން
POST https://chatapi.smsbat.com/api/chat/callback-events/processed
Authorization: Bearer <token>
Content-Type: application/json
[ "ff60129e-c6e4-4876-9d90-badb430c0606" ]
200 OK → { "deleted": 1 }
މިހާރުވެސް ނައްތާލާފައިވާ އިވެންޓްތައް ފަސޭހައިން deleted އަށް ގުނާކަށް ނުޖެހެއެވެ. އޯޑަރު ކުރުމާއި ރީޓްރައިސް ކުރުމަކީ ތިބާގެ…
ފަރާތުގެ ޒިންމާއެކެވެ.
7.3 ރަނގަޅު ލޫޕް
- ޝެޑިއުލެއްގެ މައްޗަށް
GET /api/chat/callback-eventsވޯޓުލުން. - ތިމާގެ ޚިދުމަތުގައި ހިނގާ ކަންތައްތައް ޕްރޮސެސްކުރުން.
- ޕްރޮސެސް ކުރެވިފައިވާ
event_guidލިސްޓް/callback-events/processedއަށް ފޮނުވުން. - ތަކުރާރުކުރުން.
8. އެނަމް ރެފަރެންސް
8.1 ChatSource — ޗެނަލް (0–9)
| ކޯޑް | ޗެނަލް |
|---|---|
| 0 | ވައިބަރ |
| 1 | ވައިބަރބޮޓް |
| 2 | ޓެލެގްރާމްބޮޓް |
| 3 | ވަޓްސްއެޕް |
| 4 | ވިޖެޓް |
| 5 | ރޮޒެޓްކާ |
| 6 | ފޭސްބުކް |
| 7 | އިންސްޓަގްރާމް |
| 8 | ޕްރޮމް |
| 9 | އޮލްކްސް |
8.2 SendingSourceCallback — ކޯލްބެކް އިވެންޓް ޓައިޕް (0–13)
| ކޯޑް | އިވެންޓް |
|---|---|
| 3 | Chat — އާ ޗެޓް މެސެޖެއް، ސްޓޯރީ ރިޕްލައިސް ހިމެނޭ ގޮތަށް |
| 5 | ޗެޓް ސްޓޭޓަސް ބަދަލުވެއްޖެ |
| 6 | މެސެޖް ސްޓޭޓަސް ބަދަލުވެއްޖެ |
| 7 | އާ ޗެޓެއް އުފެއްދި |
| 8 | ޓައިޕިންގ އިންޑިކޭޓަރ |
| 9 | މެސެޖް އަޕްޑޭޓް ނުވަތަ ޑިލީޓް ކޮށްފި |
| 11 | AnyChatMessage — އެއްވެސް ޗެޓް މެސެޖެއް |
| 12 | MetaNewComment — އާ އިންސްޓަގްރާމް / ފޭސްބުކް ކޮމެންޓް |
| 13 | MetaCommentStatus — އަޅުގަނޑުމެންގެ ކޮމެންޓް ރިޕްލައިގެ ޑެލިވަރީ ސްޓޭޓަސް |
އެނަމް ސްޕަންސް 0–13؛ ބާކީ ހުރި އަގުތައް އިންސްޓަގްރާމް އިންޓަގްރޭޝަންތަކަށް ބޭނުން ނުވެ އެވެ.
8.3 ChatStatus (0–4)
0 އައު، 1 ހުޅުވާފައި، 2 އިންތިޒާރު ކުރަމުން، 3 އޮންޕޯޒް، 4 ބަންދުކޮށްފައި
8.4 MessageStatus (0–11)
| ކޯޑް | ނަން |
|---|---|
| 0 | އައު |
| 1 | ކާމިޔާބީ |
| 2 | ރިޖެކްޓްކޮށްފި |
| 3 | ކިޔުން |
| 4 | ނޭނގޭ |
| 5 | ޕްރޮސެސިންގ |
| 6 | ޑެލިވަރީ ކޮށްދީފި |
| 7 | BLOCKED_BY_USER |
| 8 | ޔޫޒަރ_ނޮޓް_ފޯންޑް |
އެނަމް ސްޕަންސް 0–11 އެވެ. އެޕީއައިގައި 9، 10 އަދި 11 ގެ އަގުތައް ހުރި ނަމަވެސް އަދި ލިޔެކިޔުންތައް ލިބިފައެއް ނުވެއެވެ —
އެމީހުންނާ މެދު ކަންތައް ކުރާނީ UNKNOWN ގެ ގޮތުގައެވެ.
8.5 MediaType (1–10)
1 ފޮޓޯ، 2 ފައިލް، 3 އޯޑިއޯ، 4 ވީޑިއޯ، 5 ސްޓިކާ، 6 ސްޓިކާއެނިމޭޓެޑް،
7 ސްޓިކާވީޑިއޯ، 8 އެނިމޭޝަން، 9 އަޑު، 10 ވީޑިއޯނޯޓް
8.6 AuthorMessage — ޗެޓް އެޕީއައިގައި ލިޔުންތެރިޔާ (0–4)
0 އޮޕަރޭޓަރ، 1 ކްލައިންޓް، 2 ބޮޓް، 3 ވައިބަރއެކައުންޓް
އެނަމް ސްޕަންސް 0–4؛ އަގު 4 އަކީ ލިޔެކިޔުންތައް ނެތް އަގެކެވެ. “އާ މެސެޖް” ކޯލްބެކްތަކުގައި ބޭނުންކުރަނީ…
އިދިކޮޅު މެޕިންގ — §6.2 ބައްލަވާށެވެ.
8.7 ChatMessageType (0–2)
0 ލިޔުން، 1 ފޮޓޯ، 2 ފައިލް
8.8 ކޮމެންޓް replyStatus
null އިންބައުންޑް ޔޫޒަރ ކޮމެންޓް، "pending" އަޅުގަނޑުމެންގެ ޖަވާބު ކިއު ކޮށްފައި، "sent" ޑެލިވަރ ކުރެވިފައި،
"failure" ޑެލިވަރީ ފެއިލްވެއްޖެ.
ހުޅުވާލެވިފައިވާ ސުވާލުތައް
އެތެރޭގެ ސްޕެސިފިކޭޝަން އާއި ކޯޑް ޖެނެރޭޓް ސްވެގަރ އާއި އެއްގޮތް ނުވާ ތިން ނުކުތާއެވެ. އެއް ހަގީގީ ޓޯކެނަކާއެކު ރިކުއެސްޓް އެ ހުރިހާ ކަމެއް ސެޓްލް ކުރެއެވެ؛ އޭގެ ކުރިން ކްލައިންޓަށް ދިފާޢީ ގޮތުން ލިޔެލާށެވެ.
| # | ސުވާލު | ސްޕެސިފިކޭޝަން | ސްވެގަރ | ޗެކް ކުރާނެ ގޮތް |
|---|---|---|---|---|
| 1 | /api/meta/* އަށް އޮތު ހެޑަރ | X-Authorization-Key | ހަމައެކަނި Bearer އިއުލާންކޮށްފައި | curl -i -H "X-Authorization-Key: <token>" ".../api/meta/posts?perPage=1" — އުންމީދު 200، ނޫން 401 |
| 2 | މެޓާ ރެސްޕޮންސްތަކުގައި ކައުންޓަރ ފީލްޑް | totalCount | total | ހަމަ އެ ރިކުއެސްޓް — ރޫޓް ޖޭއެސްއޯއެން ކީ ކިޔާށެވެ |
| 3 | author.type ވައްތަރާއި reply ސްޓޭޓަސް ކޯޑް | "meta_user" / "owner"، 202 ހަށިގަނޑާއެކު | int [0,1]، 200 ހަށިގަނޑެއް ނެތް | curl -i .../api/meta/comments?perPage=1 އަށް އިތުރުކޮށް ޓެސްޓް ޖަވާބެއް |
ވަގުތީ އިރުޝާދު:
- ކައުންޓަރ — ކިޔުން
total ?? totalCount؛ author.type— ސްޓްރިންގ އާއި އިންޓިޖަރ ވެސް ގަބޫލުކުރުން (0↔meta_user،1↔owner، މެޕިންގ ކޮންފަރމް ކުރަންޖެހޭ)؛reply— އެއްވެސް2xxއެއް ކާމިޔާބީއެއްގެ ގޮތުގައި ބަލާ، އެއްވެސް ހަށިގަނޑެއް ބޭނުން ނުވާ،source: 13ކޯލްބެކް އިން ފައިނަލް ސްޓޭޓަސް ނަގާށެވެ.
ތަންފީޒުކުރުމުގެ ނޯޓްސް
- އެންޑްޕޮއިންޓް ގްރޫޕަކަށް އޮތު ތަފާތުވޭ —
/api/meta/*ބޭނުންކުރަނީX-Authorization-Key، ޗެޓް އަދި… އޮޕަރޭޓަރުން ބޭނުންކުރަނީBearer،restapiއިން އެއްވެސް އެއްޗެއް ބަލައިގަންނައެވެ. - ޕެޖިނޭޝަން އިމްތިޙާނު ކުރެވެނީ ދެގޮތަކަށް —
per_pageގައި/api/chat/chats،perPageގައި/api/meta/*އަދި/api/chat/callback-eventsއެވެ. multipart/form-dataފީލްޑްތަކަކީ ޑޮޓް ނޯޓޭޝަން (Media.File،Media.Type) އެކުލެވޭ ޕަސްކަލްކޭސް އެވެ.- ކޯލްބެކްތަކުން ނަލް ފީލްޑްތައް އުނިކޮށްފައިވޭ — ނެތް ކީއެއްގެ މާނައަކީ
nullއެވެ. phoneއަކީ އާންމުކޮށް އިންސްޓަގްރާމްގައިnullއެވެ. ކަސްޓަމަރު ދެނެގަތުންinstagramUser.id/metaUserIdއަދި ފިހާރައަށްinstaAccount.id(entityIdފިލްޓަރ ވެލިއު) އިންނެވެ.- ކޯލްބެކަކުން
Story.Idސީދާ ފަހަތަށްid/postIdގެ ގޮތުގައި މެޓާ އެޕީއައި އަށް ފޮނުވޭނެއެވެ. - ޑީޕްލިންކެއް ނުވަތަ ވިޖެޓެއްގައި ބޭނުން ކުރުމުގެ ކުރިން އޮޕަރޭޓަރ ޖޭޑަބްލިޔުޓީގެ
expiresAtޗެކްކުރުން.