Skip to main content
LINE 1対1チャット送信
curl --request POST \
  --url https://api.utage-system.com/v1/accounts/{account_id}/line/friends/{friend_id}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sender_id": "<string>",
  "reply_token": "<string>",
  "text": "<string>",
  "original_content_url": "<string>",
  "preview_image_url": "<string>",
  "duration": 2,
  "package_id": "<string>",
  "sticker_id": "<string>",
  "template_id": "<string>"
}
'
{
  "data": {
    "type": "<string>",
    "sent_at": "<string>",
    "template_id": "<string>"
  }
}
POST
https://api.utage-system.com/v1/accounts/{account_id}/line/friends/{friend_id}/messages
この機能はプレビュー版です。仕様が変更される場合があります。

Authorizations

Authorization
string
header
required

APIキーをBearerトークンとして指定

Path Parameters

account_id
string
required

アカウントID

friend_id
string
required

LINE友だちID

Body

application/json
type
enum<string>
required

メッセージタイプ

Available options:
text,
image,
video,
audio,
sticker,
button
sender_id
string

カスタム送信者ID。type=text/image/video/audio/sticker のときのみ有効(type=button では無視)

reply_token
string

LINEリプライトークン。指定時はReply APIで送信を試み、失敗時はPush APIにフォールバック

text
string

メッセージ本文(type=textで必須)

Maximum string length: 5000
original_content_url
string<uri>

コンテンツURL(HTTPS必須)。type=image/video/audioで必須

preview_image_url
string<uri>

プレビュー画像URL(HTTPS必須)。type=videoで必須。type=imageでは指定不可

duration
integer

再生時間(ミリ秒)。type=audioで必須

Required range: x >= 1
package_id
string

LINEスタンプパッケージID(type=stickerで必須)

sticker_id
string

LINEスタンプID(type=stickerで必須)

template_id
string

テンプレートID(type=buttonで必須)

Response

送信結果

data
object