Set LINE Webhook Endpoint
line_set_webhook_endpointSet or get the webhook URL for your LINE Official Account to receive events. Use with line_test_webhook for verification.
Instructions
Read or write the LINE OA's webhook URL (PUT/GET /v2/bot/channel/webhook/endpoint). Complements line_test_webhook — set the URL here, then ping it with line_test_webhook.
Args:
mode ('set' | 'get'): write or read.
endpoint (string, set only): public HTTPS URL (https:// required, ≤500 chars).
oa (string, optional): OA id. Default = active OA.
Returns: { endpoint: string, active: boolean } // re-read after a 'set' to confirm
Examples:
"ตั้ง webhook เป็น https://api.example.com/line" → { mode: "set", endpoint: "https://api.example.com/line" }
"ดู webhook URL ปัจจุบัน" → { mode: "get" }
Errors:
Non-HTTPS or >500 char URL → inline input error (LINE requires HTTPS).
mode='set' without endpoint → inline input error.
LINE rejects the URL → LineApiError surfaced.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | set: write a new webhook URL; get: read the currently configured one. | |
| endpoint | No | Required for mode='set'. Public HTTPS URL (must start with https://, ≤500 chars). | |
| oa | No | Optional OA id; defaults to active OA. |