get_message_history
Retrieve LINE message history with filters for date range, direction, friend, and unread status. Supports pagination with cursor.
Instructions
友だちとのLINEメッセージ履歴(受信・送信・システムメッセージ)を検索・取得する。既定では送信日時の新しい順(sort_order=desc)に返る。特定の友だちとのやり取りだけを見たい場合はfriend_id を指定する。期間で絞り込むには sent_at_from / sent_at_to(ISO 8601形式)を使う。1回のリクエストで最大1000件(既定50件)。続きを取るには前回レスポンスの next_cursor を cursor に渡す(このエンドポイントは前ページへの遡り取得には対応していない)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | 取得件数(最大1000、既定50) | |
| cursor | No | 前回レスポンスの next_cursor を渡すとその続きから取得する | |
| direction | No | メッセージ方向で絞り込む(inbound=友だちからの受信 / outbound=こちらからの送信 / system=システム通知) | |
| friend_id | No | この友だちとのメッセージのみに絞り込む | |
| sent_at_to | No | 送信日時の範囲終了(ISO 8601形式) | |
| sort_order | No | 送信日時での並び順(既定 desc=新しい順) | desc |
| sent_at_from | No | 送信日時の範囲開始(ISO 8601形式、例: 2026-06-01T00:00:00+09:00) | |
| is_unconfirmed | No | true の場合、未読メッセージのみに絞り込む |