skills/line-notification-message/SKILL.md
Reference for LINE Notification Messages — phone-number-based messaging to non-friends, template type (premade layouts) and flexible type (custom Flex Message), delivery completion webhooks, user consent flow, SMS authentication, and billing. Use when the user asks to "send a notification message via phone number", "hash a phone number for PNP", "handle delivery completion webhook", "set up template or flexible notification", "check notification message count", "integrate LON", or mentions LINE notification messages, LINE Official Notification (LON), PNP push, phone-number-based delivery, hashed phone number, notification template, delivery completion event, consent states, or SMS authentication for notifications. Always use this skill whenever the user mentions LINE notification messages, PNP, LON, LINE Official Notification, LINE 通知型訊息, or phone-based LINE messaging to non-friends, even if they don't explicitly say "notification message".
npx skillsauth add abgne/line-dev line-notification-messageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Do not answer LINE Notification Messages questions from memory — LINE updates APIs frequently and training data is unreliable. Always consult the references below.
LINE Notification Messages allow sending messages to users by specifying their phone number (SHA256-hashed E.164 format), even if they haven't added the LINE Official Account as a friend. Corporate-only service available in Japan, Thailand, and Taiwan. Not for advertising or commercial purposes.
LINE_CHANNEL_ACCESS_TOKEN=Bot access token (Messaging API channel)
LINE_CHANNEL_SECRET=Channel secret (webhook signature verification)
Read references/api-common.md before writing any notification message code. Contains rules that affect all API interactions: forward compatibility (don't use strict schemas — LINE adds fields without notice), rate limits, error handling, and logging recommendations.
| Type | Description | UX Review | Send Endpoint |
|------|-------------|-----------|---------------|
| Template | Predefined layout with templateKey, itemKey, buttonKey. Easy to set up. | Not required | POST /v2/bot/message/pnp/templated/push |
| Flexible | Free-form message objects (Flex Message, text, etc.). Greater design freedom. | Required | POST /bot/pnp/push |
Full type comparison → references/sending-api.md
# 1. Hash phone number (E.164 → SHA256)
phone = "+818000001234" # E.164 format, no hyphens
hashed = SHA256(phone.encode()).hexdigest() # 64-char lowercase hex
# 2a. Send via template type
POST https://api.line.me/v2/bot/message/pnp/templated/push
Authorization: Bearer {channel_access_token}
X-Line-Delivery-Tag: {optional_tracking_tag}
{
"to": hashed,
"templateKey": "shipment_completed_ja",
"body": {
"emphasizedItem": {"itemKey": "date_002_ja", "content": "August 10"},
"items": [{"itemKey": "number_001_ja", "content": "1234567"}],
"buttons": [{"buttonKey": "contact_ja", "url": "https://example.com"}]
}
}
# → Response: 202 Accepted
# 2b. OR send via flexible type
POST https://api.line.me/bot/pnp/push
Authorization: Bearer {channel_access_token}
{
"to": hashed,
"messages": [{"type": "text", "text": "Your order has shipped"}]
}
# → Response: 200 OK
# 3. IMPORTANT: 200/202 does NOT guarantee delivery
# User may be blocked, consent not given, SMS auth expired, etc.
# 4. Delivery confirmation arrives via webhook
# event.type = "delivery", delivery.data = hashed phone or delivery tag
| Operation | Endpoint | Response |
|-----------|----------|----------|
| Send (Template) | POST /v2/bot/message/pnp/templated/push | 202 |
| Send (Flexible) | POST /bot/pnp/push | 200 |
| Count (Template) | GET /v2/bot/message/delivery/pnp/templated?date=yyyyMMdd | 200 |
| Count (Flexible) | GET /v2/bot/message/delivery/pnp?date=yyyyMMdd | 200 |
api.line.meX-Line-Retry-Key is NOT supported — do not use retry keysFull API specs, parameters, error codes → references/sending-api.md
+818000001234hashlib.sha256("+818000001234".encode()).hexdigest()| State | Behavior | |-------|----------| | Agree (on) | Message delivered normally | | Reject (off) | Message deleted, not delivered | | Not set | User receives consent prompt; 24 hours to agree or message is deleted |
200/202 does NOT guarantee deliverytype: "delivery") to confirm actual deliveryFull technical specs → references/technical-specs.md Template system details → references/template-system.md Webhook details → references/delivery-webhook.md
| File | Topic | |------|-------| | references/api-common.md | Read first. Rate limits, status codes, error handling, forward compatibility | | references/sending-api.md | Send APIs (template + flexible), count APIs, request/response specs, error codes | | references/template-system.md | Template structure: templateKey, itemKey, buttonKey, field limits, country suffixes | | references/technical-specs.md | Phone hashing, sending conditions, consent flow, SMS auth, billing, IP restrictions | | references/delivery-webhook.md | Delivery completion event, X-Line-Delivery-Tag, user consent flows, non-friend behavior | | references/experts.md | LINE Notification Messages domain experts for architecture guidance |
Official SDKs: Python | Node.js | Go | Java | PHP | Ruby
Other languages: use LINE OpenAPI specs with OpenAPI Generator.
development
Comprehensive reference for LINE Messaging API — webhook setup, message sending, Flex Message design, Rich Menu management, audience targeting, insights, coupons, and channel access tokens. This skill should be used when the user asks to "build a LINE Bot", "set up a webhook", "send a push message", "design a Flex Message", "create a Rich Menu", "manage audience targeting", "get messaging insights", "create a coupon campaign", "debug webhook signature verification", or mentions LINE Messaging API, LINE OA chatbot, reply/push/multicast/narrowcast/broadcast, Flex Message JSON, Rich Menu, group chat bot, channel access token, or URL schemes. Always use this skill whenever the user mentions LINE bots, chatbots, LINE OA, or any messaging-related LINE integration, even if they don't explicitly say "Messaging API".
development
Comprehensive reference for LINE MINI App — Service Messages, Common Profile Quick Fill, In-App Purchase, Console setup (3 internal channels), submission review, and performance guidelines for web apps running inside LINE as an enhanced LIFF platform. This skill should be used when the user asks to "build a LINE MINI App", "send a service message", "set up Common Profile Quick Fill", "implement in-app purchase", "configure MINI App Console", "submit MINI App for review", or mentions LINE MINI App, Service Messages, notification token, Common Profile, IAP purchase flow, 3 internal channels, consent simplification, Custom Path, custom share messages, or verified vs unverified MINI App. Always use this skill whenever the user mentions LINE MINI App, mini apps in LINE, or enhanced LIFF features like service messages or in-app purchase, even if they don't explicitly say "MINI App".
development
Comprehensive reference for LINE Login (OAuth 2.1) — authorization code flow, PKCE, token management, ID token JWT verification, user profiles, bot linking, and login button design. This skill should be used when the user asks to "implement LINE Login", "add Log in with LINE", "set up OAuth authorization flow", "verify an ID token", "refresh an access token", "link a bot to login", "design a login button", or mentions LINE Login, OAuth 2.1, PKCE, authorization code flow, ID token JWT verification, token refresh/revocation, user profile retrieval, bot linking, SSO login, LIFF authentication, or LINE MINI App authentication. Always use this skill whenever the user mentions LINE authentication, social login with LINE, or OAuth flows involving LINE, even if they don't explicitly say "LINE Login".
tools
Comprehensive reference for LINE Front-end Framework (LIFF) SDK — building web apps inside LINE with authentication, messaging, QR scanning, permanent links, pluggable SDK, and LIFF plugin development. This skill should be used when the user asks to "build a LIFF app", "initialize liff.init()", "send messages from LIFF", "use Share Target Picker", "scan a QR code in LIFF", "create a permanent link", "develop a LIFF plugin", or mentions LIFF SDK, LINE Front-end Framework, CDN/npm integration, pluggable SDK tree-shaking, LIFF-to-LIFF transitions, LIFF browser vs external browser, Endpoint URL configuration, or server-side ID token verification from LIFF. Always use this skill whenever the user mentions LIFF, web apps inside LINE, or LINE Front-end Framework, even if they don't explicitly say "LIFF SDK".