4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Windows の Curl で LINE WORKS にメッセージ送信 (LINE WORKS API 2.0)

Posted at

Windows の Curl で LINE WORKS にメッセージ送信

Windows の Curl で LINE WORKS のトーク BOT API を用いて、任意のメンバーやトークルームにメッセージを送る方法です。

事前作業

LINE WORKS でトークボット API を利用するため、LINE WORKS の Developer Console と管理画面で API 2.0 や Bot の設定を行ってください。

トーク Bot API によるメッセージ送信

LINE WORKS の API 2.0 の トーク Bot API の解説はこちらのページです。
https://developers.worksmobile.com/jp/reference/bot?lang=ja

{Token} → トークンを入力
{botId} → botId を入力
{userId} → 送信先の userId を入力

curl -d "{\"content\" :{\"type\":\"text\",\"text\":\"<メッセージ>\"}}" -H "Content-Type: application/json" -H "Authorization: Bearer <Token>" -X POST https://www.worksapis.com/v1.0/bots/<botId>/users/<userId>/messages

以上です。

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?