# Server API
The version number of the server API is different from that of LIFF SDK. The currently released version of LIFF SDK is v2
, but the version of the server API is v1
.
# Server API
# Preparing a channel access token
The LIFF server API is used to operate the LIFF apps on the LINE Login channel. Therefore, in order to use the server API, a channel access token for the LINE Login channel is required. The types of channel access tokens available are short-lived channel access tokens or stateless channel access tokens.
# Adding the LIFF app to a channel
Adds the LIFF app to a channel. You can add up to 30 LIFF apps on one channel.
In the future, LIFF and the LINE MINI App will be integrated into a single brand. As a result of this integration, LIFF will be integrated into the LINE MINI App. For this reason, we recommend that you create a new LIFF app as a LINE MINI App. For more information, see the news from February 12, 2025.
# HTTP request
POST https://api.line.me/liff/v1/apps
# Request headers
Authorization
Bearer {channel access token}
For more information, see Preparing a channel access token.
Content-Type
application/json
# Request body
view.type
String
Size of the LIFF app view. Specify one of these values:
compact
tall
full
For more information, see Size of the LIFF app view.
view.url
String
Endpoint URL. This is the URL of the web app that implements the LIFF app (e.g. https://example.com
). Used when the LIFF app is launched using the LIFF URL.
The URL scheme must be https. URL fragments (#URL-fragment) can't be specified.
view.moduleMode
Boolean
true
to use the LIFF app in modular mode. When in modular mode, the action button in the header is not displayed.
description
String
Name of the LIFF app.
The LIFF app name can't include "LINE" or similar strings, or inappropriate strings.
features.qrCode
Boolean
true
to use the 2D code reader in the LIFF app. false
otherwise. The default value is false
.
permanentLinkPattern
String
How additional information in LIFF URLs is handled. Specify concat
.
For more information, see Opening a LIFF app in the LIFF documentation.
scope
Array of strings
Array of scopes required for some LIFF SDK methods to function.
openid
email
profile
chat_message.write
The default value is ["profile", "chat_message.write"]
. For more information on each scope, see Adding the LIFF app to your channel in the LIFF documentation.
botPrompt
String
Specify the setting for add friend option with one of the following values:
normal
: Display the option to add the LINE Official Account as a friend in the channel consent screen.aggressive
: Display a screen with the option to add the LINE Official Account as a friend after the channel consent screen.none
: Don't display the option to add the LINE Official Account as a friend.
The default value is none
.
# Response
Returns status code 200
and a JSON object with the following properties.
liffId
String
LIFF app ID
# Error response
One of the following status codes is returned.
Status code | Description |
---|---|
400 | This status code means one of the following:
|
401 | Authentication failed. |
# Update LIFF app settings
# HTTP request
PUT https://api.line.me/liff/v1/apps/{liffId}
# Request headers
Authorization
Bearer {channel access token}
For more information, see Preparing a channel access token.
Content-Type
application/json
# Path parameters
liffId
ID of the LIFF app to be updated
# Request body
view.type
String
Size of the LIFF app view. Specify one of these values:
compact
tall
full
For more information, see Size of the LIFF app view.
view.url
String
Endpoint URL. This is the URL of the web app that implements the LIFF app (e.g. https://example.com
). Used when the LIFF app is launched using the LIFF URL.
The URL scheme must be https. URL fragments (#URL-fragment) can't be specified.
view.moduleMode
Boolean
true
to use the LIFF app in modular mode. When in modular mode, the action button in the header is not displayed.
description
String
Name of the LIFF app.
The LIFF app name can't include "LINE" or similar strings, or inappropriate strings.
features.qrCode
Boolean
true
to use the 2D code reader in the LIFF app. false
otherwise.
permanentLinkPattern
String
How additional information in LIFF URLs is handled. Specify concat
.
For more information, see Opening a LIFF app in the LIFF documentation.
scope
Array of strings
Array of scopes required for some LIFF SDK methods to function.
openid
email
profile
chat_message.write
For more information on each scope, see Adding the LIFF app to your channel in the LIFF documentation.
botPrompt
String
Specify the setting for add friend option with one of the following values:
normal
: Display the option to add the LINE Official Account as a friend in the channel consent screen.aggressive
: Display a screen with the option to add the LINE Official Account as a friend after the channel consent screen.none
: Don't display the option to add the LINE Official Account as a friend.
Only the properties specified in the request body are updated.
# Response
Status code 200
is returned.
# Error response
One of the following status codes is returned.
Status code | Description |
---|---|
400 | The request contains an invalid value. |
401 | Authentication failed. |
404 | This status code means one of the following:
|
# Get all LIFF apps
# HTTP request
GET https://api.line.me/liff/v1/apps
# Request headers
Authorization
Bearer {channel access token}
For more information, see Preparing a channel access token.
# Response
Returns status code 200
and a JSON object with these properties.
apps
Array of objects
Array of LIFF app objects
apps[].liffId
String
LIFF app ID
apps[].view.type
String
Size of the LIFF app view. One of these values:
compact
tall
full
For more information, see Size of the LIFF app view.
apps[].view.url
String
Endpoint URL. This is the URL of the web app that implements the LIFF app (e.g. https://example.com
). Used when the LIFF app is launched using the LIFF URL.
apps[].view.moduleMode
Boolean
true
to use the LIFF app in modular mode. When in modular mode, the action button in the header is not displayed.
apps[].description
String
Name of the LIFF app
apps[].features.ble
Boolean
true
if the LIFF app supports Bluetooth® Low Energy for LINE Things. false
otherwise.
apps[].features.qrCode
Boolean
true
if the 2D code reader can be launched in the LIFF app. false
otherwise.
apps[].permanentLinkPattern
String
How additional information in LIFF URLs is handled. concat
is returned.
For more information, see Opening a LIFF app in the LIFF documentation.
apps[].scope
Array of strings
Scopes of the LIFF app.
openid
email
profile
chat_message.write
For more information on each scope, see Adding the LIFF app to your channel in the LIFF documentation.
apps[].botPrompt
String
The setting for add friend option.
normal
: Display the option to add the LINE Official Account as a friend in the channel consent screen.aggressive
: Display a screen with the option to add the LINE Official Account as a friend after the channel consent screen.none
: Don't display the option to add the LINE Official Account as a friend.
# Error response
One of the following status codes is returned.
Status code | Description |
---|---|
401 | Authentication failed. |
404 | There is no LIFF app on the channel. |
# Delete LIFF app from a channel
# HTTP request
DELETE https://api.line.me/liff/v1/apps/{liffId}
# Request headers
Authorization
Bearer {channel access token}
For more information, see Preparing a channel access token.
# Path parameters
liffId
ID of the LIFF app to be deleted
# Response
Status code 200
is returned.
# Error response
One of the following status codes is returned.
Status code | Description |
---|---|
401 | Authentication failed. |
404 | This status code means one of the following:
|