봇 채널 내 메시징
봇 메시지 전송
POST
https://api.talkplus.io/v1.4/api/bots/:botId/channels/:channelId/send
봇이 가입되어 있는 채널에서 메시지를 전송합니다.
현재 지원하는 봇 메시지 타입은 bot 그리고 bot_hidden 타입입니다.
default 타입은 bot 입니다
bot_hidden 타입 메시지 발송 시, push notification는 발송되지 않습니다.
메세지 텍스트의 허용된 최대 길이는 8192자입니다.
data의 경우, 최대 10개의 Key-value 형식의 데이터를 넣을 수 있습니다.
key값의 최대 길이는 128자이고, value값의 최대 길이는 1024자입니다.
key, value 둘 다 문자열이어야 합니다.
메시지 텍스트와 data 둘 다 빈 값일 경우 발송에 실패합니다.
Path Parameters
Name
Type
Description
botId*
string
channelId*
string
Headers
Name
Type
Description
content-type
string
application/json
app-id*
string
App ID
api-key*
string
App API key
Request Body
Name
Type
Description
type*
string
메시지 타입 ("bot" 또는 "bot_hidden"만 가능)
text
string
메시지 텍스트
data
object
custom metadata
fileUrl
string
파일 경로 직접 지정
{
"message": {
"id": "sdf2l5s9j",
"channelId": "channel123",
"userId": "bot_001",
"username": "bot_name",
"profileImageUrl": "http://cdn.test.com/456.jpg",
"type": "bot",
"text": "Hello world",
"data": {
"customField": "customData"
},
"parentMessage": {},
"translations": {},
"reactions": {},
"fileUrl": "http://cdn.test.com/123.jpg",
"mentions": [],
"createdAt": 1583921400
}
}
Last updated