Emit LIFF SDK init code
line_emit_liff_codeGenerate LIFF SDK init code with feature-detection guards for any framework and selected features, ready to copy and paste.
Instructions
Generate a working LIFF SDK init code snippet for the requested framework and features. The output is paste-ready and includes feature-detection guards (e.g., scanCodeV2 only on LINE 14+, iOS 14.3+).
Args:
framework: vanilla | react | next-app-router | vue | svelte. Default 'vanilla'.
features: array from [getProfile, scanCode, shareTargetPicker, sendMessages, openWindow, permission, getIDToken]. Default ['getProfile'].
liff_id_placeholder: string to use where the LIFF ID goes. Default 'YOUR_LIFF_ID'.
typescript: emit TypeScript (default) or plain JavaScript.
Returns: { framework, features, language: 'ts' | 'js', code: string, // copy-paste ready install_command: string, notes: string[] }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| framework | No | vanilla | |
| features | No | LIFF SDK features the generated code should demonstrate / wire up. | |
| liff_id_placeholder | No | Placeholder to use for the LIFF ID in the emitted code. | YOUR_LIFF_ID |
| typescript | No |