# 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
You need a channel access token for the LINE Login channel to use the LIFF Server API. For more information, see Issue short-lived channel access token in the Messaging API reference.
# Adding the LIFF app to a channel
# 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.ble
Boolean
true
if the LIFF app supports Bluetooth® Low Energy for LINE Things. false
otherwise.
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 bot link feature 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.ble
Boolean
true
if the LIFF app supports Bluetooth® Low Energy for LINE Things. false
otherwise.
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 bot link feature 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 bot link feature.
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:
|