メッセージ送信 (text)
トーク Bot を使ってテキストメッセージを送信します。
テキストメッセージは多言語に対応しており、メンバーの言語設定に合わせて表示を切り替えることができます。
API の種類
サーバー API
Request URL
https://apis.worksmobile.com/r/{API ID}/message/v1/bot/{botNo}/message/push
HTTP Method
POST(Content-Type: application/json; charset=UTF-8)
Request Content
common
パラメーター | タイプ | 必須 | 必須 |
---|---|---|---|
type | string | Y | "text" |
text | string | Y | メッセージの内容 最大 2,000 字 |
multi language
パラメーター | タイプ | 必須 | 説明 |
---|---|---|---|
i18nTexts[] | array | N | 多言語のメッセージリスト |
i18nTexts[].language | string | Y | 言語コード ●ja_JP ●ko_KR ●zh_CN ●zh_TW ●en_US |
i18nTexts[].text | string | Y | メッセージの内容 最大 2,000 字 |
Request Example
simple
{
"accountId": "admin@example.com",
"content": {
"type": "text",
"text": "hello"
}
}
detail
{
"accountId": "admin@example.com",
"content": {
"type": "text",
"text": "hello",
"i18nTexts": [{
"language": "ja_JP",
"text": "こんにちは"
},{
"language": "ko_KR",
"text": "안녕하세요"
}]
}
}
Response
呼び出しに成功すると HTTP 200 コードを返します。
Error Code
呼び出しに失敗するとエラーコードとエラーメッセージを返します。
エラーコードはトーク Bot REST APIエラーコードを参照してください。