# Server API

# Server API

# Preparing a channel access token

You need a channel access token to use the LIFF server API.

# On a LINE Login channel

Issue a channel access token for the LINE Login channel.

For more information, see Issue short-lived channel access token in the Messaging API reference.

# On a Messaging API channel

Issue a channel access token for the Messaging API channel.

For more information, see Channel access tokens in the Messaging API documentation.

# 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.

Example request

# HTTP request

POST https://api.line.me/liff/v1/apps

# Request headers

Authorization

Required

Bearer {channel access token}
For more information, see Preparing a channel access token.

Content-Type

Required

application/json

# Request body

view.type

String

Required

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

Required

Endpoint URL. This is the URL of the web app that implements the LIFF app (example: https://{Heroku app name}.herokuapp.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

Optional

true to use the LIFF app in modular mode. When in modular mode, the share button in the header is not displayed.

description

String

Optional

Name of the LIFF app

features.ble

Boolean

Optional

true if the LIFF app supports Bluetooth® Low Energy for LINE Things. false otherwise.

permanentLinkPattern

String

Optional

How additional information in LIFF URLs is handled. Specify concat.

For more information, see Opening a LIFF app in the LIFF documentation.

# Response

Returns status code 200 and a JSON object with the following properties.

liffId

String

LIFF app ID

Example response

# Error response

One of the following status codes is returned.

Status code Description
400 This status code means one of the following:
  • The request contains an invalid value.
  • The maximum number of LIFF apps that can be added to the channel has been reached.
401 Authentication failed.

# Update LIFF app settings

Partially updates LIFF app settings.

Example request

# HTTP request

PUT https://api.line.me/liff/v1/apps/{liffId}

# Request headers

Authorization

Required

Bearer {channel access token}
For more information, see Preparing a channel access token.

Content-Type

Required

application/json

# Path parameters

liffId

Required

ID of the LIFF app to be updated

# Request body

view.type

String

Optional

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

Optional

Endpoint URL. This is the URL of the web app that implements the LIFF app (example: https://{Heroku app name}.herokuapp.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

Optional

true to use the LIFF app in modular mode. When in modular mode, the share button in the header is not displayed.

description

String

Optional

Name of the LIFF app.

features.ble

Boolean

Optional

true if the LIFF app supports Bluetooth® Low Energy for LINE Things. false otherwise.

permanentLinkPattern

String

Optional

How additional information in LIFF URLs is handled. Specify concat.

For more information, see Opening a LIFF app in the LIFF documentation.

Note

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
401 Authentication failed.
404 This status code means one of the following:
  • The specified LIFF app does not exist.
  • The specified LIFF app has been added to another channel.

# Get all LIFF apps

Gets information on all the LIFF apps added to the channel.

Example request

# HTTP request

GET https://api.line.me/liff/v1/apps

# Request headers

Authorization

Required

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 (example: https://{Heroku app name}.herokuapp.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 share 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[].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.

Example response

# 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

Deletes a LIFF app from a channel.

Example request

# HTTP request

DELETE https://api.line.me/liff/v1/apps/{liffId}

# Request headers

Authorization

Required

Bearer {channel access token}
For more information, see Preparing a channel access token.

# Path parameters

liffId

Required

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:
  • The specified LIFF app does not exist.
  • The specified LIFF app has been added to another channel.