LINE Front-end Framework (LIFF) is a platform for web apps provided by LINE. The web apps running on this platform are called LIFF apps.
LIFF apps can get data from the LINE Platform such as the LINE user ID. The LIFF app can use such data to provide features that utilize user information and send messages on the user's behalf.
For more information on functions added to LIFF v2, see the Release Notes.
Currently, LIFF apps are not officially supported in OpenChat, which means some functions don't work. For example, retrieving a user's profile information through a LIFF app isn't possible in most cases.
LIFF supports the following versions of operating systems and LINE.
Which functions you can use depends on whether the LIFF app is opened in LINE's in-app browser or an external browser. For example, you can't use
liff.scanCode() in an external browser. For more information, see the LIFF v2 API reference.
When the LIFF app is opened in LINE's in-app browser
- iOS: iOS 10 or later. WKWebView is used.
- Android：5.0 or later
- LINE: Version 9.14.0 or later
When the LIFF app is opened in an external browser
LIFF apps run on the latest version of the following browsers:
Microsoft Edge, Google Chrome, Firefox, Safari
Size of the LIFF app view
A LIFF app can be displayed in one of these three sizes.
Set the view size when you add the LIFF app to your channel. For more information, see Adding a LIFF app.
When developing your LIFF app, make sure to follow these guidelines:
- The URL fragment of the page opened with a LIFF app includes data such as an access token and user ID, so be careful of data leakage.
- When the LIFF app is started, it immediately opens the endpoint URL specified in Adding a LIFF app to your channel. Call
liff.init()before changing the URL. If you call
liff.init()after changing the URL,
INIT_FAILEDwill be returned.
- To build a LIFF app as an SPA (single page application), use the History API. LIFF has limited compatibility with routing using fragments.
- When you implement an API that uses any of the device or OS functions listed below, implement the API so that user actions trigger API calls.
- Getting location information
- Accessing the camera
- Accessing the microphone
- Do not track a user with cookies, localStorage, or sessionStorage or link LINE user information with external session information without getting the user's consent.
- During your application's test phase, limit access privileges for the LIFF app through your web app.
- The URL scheme of the LIFF app and any content that is opened in the LIFF app must be https. If the URL scheme is http, the content is displayed in LINE's in-app browser. In this case, even if the web app has been registered as a LIFF app, it does not function as a LIFF app.
To enable the use of the LIFF app by the end user, follow these steps: