/reply
방에 텍스트 메시지 또는 이미지를 보냅니다.
- 엔드포인트
- POST
/reply - Content-Type
application/json
요청
본문
{
"type": "text" | "image" | "image_multiple",
"room": "[CHAT_ROOM_ID]",
"data": "[MESSAGE_TEXT]"
}typestring전송할 메시지의 타입입니다.
"text": 텍스트 메시지"image": 이미지"image_multiple": 묶음 이미지
roomstring메시지를 전송할 방의 Id입니다.
datastring | string[]전송할 데이터입니다.
type에 따라 달라질 수 있습니다."text"(string): 전송할 메시지입니다."image"(string): 전송할 이미지의 Base64 인코딩 값입니다."image_multiple"(string[]): 전송할 이미지들의 Base64 인코딩 값의 배열입니다.
응답
{
"success": true,
"message" : "success"
}예제
- 텍스트 메시지 전송
curl -d '{"type": "text", "room": "1234567890", "data": "Send message"}' \
-H "Content-Type: application/json" \
-X POST http://[YOUR_DEVICE_IP]:[bot_http_port]/reply- 이미지 전송
curl -d '{"type": "image", "room": "1234567890", "data": "[BASE64_ENCODED_IMAGE_DATA]"}' \
-H "Content-Type: application/json" \
-X POST http://[YOUR_DEVICE_IP]:[bot_http_port]/reply- 묶음 이미지 전송
curl -d '{"type": "image_multiple", "room": "1234567890", "data": ["[BASE64_ENCODED_IMAGE_DATA_1]", "[BASE64_ENCODED_IMAGE_DATA_2]", "[BASE64_ENCODED_IMAGE_DATA_3]"]}' \
-H "Content-Type: application/json" \
-X POST http://[YOUR_DEVICE_IP]:[bot_http_port]/reply