# News: Articles for #LIFF

Notice about service outage for LINE Login and LINE Front-end Framework (resolved)

We'd like to inform you about a service outage regarding LINE Login and LINE Front-end Framework. The issue has now been resolved but we sincerely apologize for any inconvenience that this may have caused.

# Date and time of outage

October 17, 2020 11:17 - 11:22 JST (GMT+9)

# Cause of the outage

Issue with our servers.

# Impact

  • LINE Login
  • LINE Front-end Framework (LIFF)
  • Social API (v2.0, v2.1)

# Details

The API returned status code 5xx for some requests.

LINE will continue to improve the quality of its services to prevent future outages. Thank you for your understanding.

Notice about service outage for LINE Login and LINE Front-end Framework (resolved)

We'd like to inform you about a service outage regarding LINE Login and LINE Front-end Framework. The issue has now been resolved but we sincerely apologize for any inconvenience that this may have caused.

# Date and time of outage

Date: October 15, 2020
Time: Around 18:34–18:42 JST (GMT+9)

# Cause of the outage

Issue with our servers.

# Impact

  • LINE Login
  • LINE Front-end Framework
  • Social API (v2.0, v2.1)

# Details

The API returned status code 5xx for some requests.

We will continue to improve the quality of the services we provide to our developers and we greatly appreciate your understanding.

LIFF v2.3.3 released

We've released LIFF v2.3.3.
This bug has been fixed in LIFF v2.3.3:

There are no feature updates in this release.

# Fixed a bug that redirects users to unintended URLs when the endpoint URL ends with /

Under these conditions, accessing a LIFF URL causes a redirect to an unintended URL with a double path separator (//).

  • The URL specified in Endpoint URL contains a path and ends in /. Example: https://example.com/campaign/
  • Methods for converting additional information in the LIFF URL is set to Concatenate.
  • The LIFF URL contains a path (/path). Example: https://liff.line.me/{liffId}/path

In LIFF v2.3.3, the bug has been fixed so that the user is redirected to the correct URL even under the above conditions.

Item LIFF URL Primary redirect URL Secondary redirect URL
Before spec change https://liff.line.me/{liffId}/path https://example.com/campaign/?liff.state={urlEncode(/path)} https://example.com/campaign//path
After spec change https://liff.line.me/{liffId}/path https://example.com/campaign?liff.state={urlEncode(path)} https://example.com/campaign/path
Impact on other versions
  • If you are using LIFF v2.3.x, we recommend that you update to this patch version.
  • This bug has already been fixed in LIFF v2.4.1.

For more information on what happens when accessing LIFF URLs, see Operation from accessing LIFF URL to opening LIFF App in the LIFF documentation.

LIFF v2.4.1 released

We have released LIFF v2.4.1.
The changes in LIFF v2.4.1 are as follows:

# Fixed an issue with the feature to open another LIFF app without closing a LIFF app

We've found that the feature to open another LIFF app without closing the LIFF app, which we announced on August 31, 2020, has a bug and didn't work correctly even if the operating conditions were met.

In LIFF v2.4.1, the operating conditions have been changed as follows and the bug has been fixed.

Items Before the changes After the changes
LIFF SDK 2.4.0 2.4.1
LINE 10.16.0 10.18.0
The use of LIFF v2.4.0 is no longer recommended

Due to the above bug, the use of LIFF v2.4.0 is no longer recommended. If you are using LIFF v2.4.0, we recommend that you update to v2.4.1.

For more information, see Opening a LIFF app from another LIFF app in the LIFF document.

# Added a feature to liff.isApiAvailable() to check whether the transition between LIFF apps is possible

liff.isApiAvailable(), a method which checks if an API is available, can now be used to check if transitioning between LIFF apps is possible.

You can now execute liff.isApiAvailable('multipleLiffTransition') to confirm whether transitioning between LIFF apps is possible before opening another LIFF app. By using this feature, you can prevent an error when opening another app.

if (liff.isApiAvailable('multipleLiffTransition')) {
  window.location.href = "https://line.me/{liffId}", // URL for another LIFF app
}
Get information about transitioning between LIFF apps with liff.getContext()

You can now also use liff.getContext(), a method which obtains information about a LIFF app, to obtain information such as whether transitioning between LIFF app is possible, and the executable LINE version.

  • availability.multipleLiffTransition.permission: Indicates whether transitioning between LIFF apps is possible.
  • availability.multipleLiffTransition.minVer: Indicates the minimum LINE version that supports the transition between LIFF apps.

Below is an example of the return value of liff.getContext().

{
    "type": "utou",
    "utouId": "UU29e6eb36812f484fd275d41b5af4e760926c516d8c9faa35…b1e8de8fbb6ecb263ee8724e48118565e3368d39778fe648d",
    "userId": "U70e153189a29f1188b045366285346bc",
    "viewType": "full",
    "accessTokenHash": "ArIXhlwQMAZyW7SDHm7L2g",
    "availability": {
        "shareTargetPicker": {
            "permission": true,
            "minVer": "10.3.0"
        },
        "multipleLiffTransition": {
            "permission": true,
            "minVer": "10.18.0"
        }
    }
}

For more information, see liff.isApiAvailable() or liff.getContext() in the LIFF API reference.

# Fixed behavior of liff.init() being called twice

If you execute liff.init() more than once under the condition that the LIFF App is successfully initialized, a rejected Promise object was returned with an error message.

In LIFF v2.4.1, the error has been fixed so that if you execute liff.init() more than once under the condition that liff.init() succeeds, a resolved Promise object will be returned, and a warning message will be displayed.

For more information on initializing your LIFF App, see the LIFF document Initializing LIFF App.

LIFF v2.1.14, v2.2.1, v2.3.2 released

LIFF v2.1.14, v2.2.1, v2.3.2 were released. The changes are as follows:

# Fixed error in which the URL fragment entered in the LIFF endpoint URL was not correctly handled by liff.permanentLink.createUrl()


Affected version

  • LIFF v2.3.2

Changes

When the LIFF endpoint URL contained a URL fragment (#URL-fragment), despite the Methods for converting additional information in the LIFF URL being set to Replace (Backward compatibility mode), the URL fragment was included in the permanent link returned after executing liff.permanentLink.createUrl().

Conditions under which this problem occurs
  • A URL fragment is included in the LIFF endpoint URL
  • Methods for converting additional information in the LIFF URL is set to Replace (Backward compatibility mode)

For example, when the Endpoint URL is set to https://example.com/path#section and liff.permanentLink.createUrl() is executed, https://liff.line.me/{liffId}/path?liff.state=#section would be returned as the permanent link. In LIFF v.2.3.2, the bug is fixed so that https://liff.line.me/{liffId} would be correctly returned.

# Fixed error in which the query parameter entered in the LIFF endpoint URL was not correctly handled by liff.permanentLink.createUrl()


Affected version

  • LIFF v2.3.2

Changes

When the LIFF endpoint URL contained a query parameter (?key=value), the query parameter would infinitely multiply in the permanent link returned after executing liff.permanentLink.createUrl().

Conditions under which this problem occurs
  • The query parameter in the LIFF endpoint URL matches the query parameter in the LIFF URL when executing liff.permanentLink.createUrl().
  • Methods for converting additional information in the LIFF URL is set to Concatenate

For example, when the Endpoint URL is set to https://example.com/path1/?q1=v1&q2=v2 and liff.permanentLink.createUrl() is executed in https://liff.line.me/{liffid}/?q1=v1&q2=v2, a permanent link with the query parameter infinitely multiplied such as https://liff.line.me/{liffid}/?q1=v1&q1=v1&q2=v2&q2=v2 would be returned.

In LIFF v.2.3.2, the bug is fixed so that https://liff.line.me/{liffid}/?q1=v1&q2=v2 would be correctly returned.

# Fixed error in which the path entered in the LIFF Endpoint URL was not correctly handled by liff.permanentLink.createUrl()


Affected versions

  • LIFF v2.3.2

Changes

When path is included in the LIFF endpoint URL and a slash (/) is used at the end of the path, the permanent link obtained by executing liff.permanentLink.createUrl() would redirect you to URL without the ending slash as shown below.

Conditions under which this problem occurs
  • Path (/path/) is included in the LIFF endpoint URL, and a slash (/) is used at the end of the path
  • Query parameter (?key=value) or URL fragment (#URL-fragment) is included in the LIFF endpoint URL
  • Methods for converting additional information in the LIFF URL is set to Concatenate

For example, if Endpoint URL is set tohttps://example.com/path/?id=xxxxxxx, accessing a permanent link obtained by executing liff.permanentLink.createUrl() would redirect you to a URL without the ending slash, such as https://example.com/path?id=xxxxxxx.

In LIFF v2.3.2, the error has been fixed so that you are correctly redirected to https://example.com/path/?id=xxxxxxx.

LIFF v2.4.0 has already been fixed

As announced on August 31, 2020, this bug fix has already been reflected in LIFF v2.4.0.

# Fixed error in which fragment was not included in the secondary redirect URL


Affected version

  • LIFF v2.3.2

Changes

When a fragment was included in the LIFF endpoint URL or LIFF URL, regardless of settings based on Methods for converting additional information in the LIFF URL, the secondary redirect URL would not include a fragment. This error has been fixed.

For more details on the secondary redirect URL or how it is affected by settings based on Methods for converting additional information in the LIFF URL, see the LIFF document Operation from accessing LIFF URL to opening LIFF App.

# Fixed bug in which LIFF URLs were redirected to unintended URLs


Affected versions

  • LIFF v2.1.14
  • LIFF v2.2.1
  • LIFF v2.3.2

Changes

In the primary redirect destination URL, additional information specified in the LIFF URL (ex:path/?key=value) is included in the liff.state query parameter. When additional information was included in the liff.state query parameter, there was bug in which you were redirected to unintended URLs as shown below.

Conditions under which this problem occurs
  • There is no / at the beginning of the liff.state query parameter
  • Methods for converting additional information in the LIFF URL is set to Replace (Backward compatibility mode)

For example, when Endpoint URL is set to https://example.com, and the liff.state query parameter was path, the domain name and path would not be separated by /, resulting in being redirected to https://example.compath.
In LIFF v2.1.14, v2.2.1, v2.3.2, the bug has been fixed so that you are correctly redirected to https://example.com/path.

Regarding vulnerability caused by unintended redirects

There is a possibility that users are redirected to malicious websites due to this bug. If you are using a LIFF SDK version before v2.4.0, we recommend that you update it.

For more information on what happens when accessing LIFF URLs, see the LIFF document Operation from accessing LIFF URL to opening LIFF App.

[Updated] LIFF v2.4.0 released

Added on September 24, 2020

LIFF v2.4.0 is no longer recommended due to a bug in the transition to another LIFF app without closing your current LIFF app feature.

Items Before the changes After the changes
LIFF SDK 2.4.0 2.4.1
LINE 10.16.0 10.18.0

If you are using LIFF v2.4.0, we recommend that you update to v2.4.1.

We have released LIFF v2.4.0. The changes in LIFF v2.4.0 are as follows:

# You can now use liff.closeWindow() before the LIFF app is initialized

You can now use the liff.closeWindow() method before the initialization of the LIFF app, even before the initialization of the LIFF app by liff.init() has finished.

Condition to execute the liff.closeWindow() method before initializing the LIFF app

To use the liff.closeWindow() method before the initialization of the LIFF app by liff.init() has finished, your LIFF SDK version must be v2.4.0 or later, and the user's LINE version must be 10.15.0 or later.

You can close the LIFF app with the liff.closeWindow() method if the LIFF app fails to initialize due to a network error, the user's LINE version, etc., as shown below.

liff
  .init({
    liffId: "123456-abcedfg" // Use own liffId
  })
  .then(() => {
    // Start to use liff's api
  })
  .catch((err) => {
    // Error happens during initialization
    console.log(err.code, err.message);
    liff.closeWindow();
  });

For more information, see liff.closeWindow() in the LIFF API Reference.

# You can now transition to another LIFF app without closing your current LIFF app

If you click the link to another LIFF app within a LIFF app whose screen is on Full display, you can display the other app while still having the LIFF browser open.
The LIFF browser doesn't close, so you can return to the original LIFF app with the return button from the LIFF browser.

Conditions for moving to another LIFF app without closing the current LIFF app (added on September 24, 2020)

There was a bug in LIFF v2.4.0 that prevented the feature from working properly. These changes have been made to the operating conditions for this feature:

  • LIFF SDK v2.4.1 or later and LINE 10.18.0 or later
  • The original LIFF app screen is set to Full display
  • The LIFF app to which you are moving is correctly initialized by liff.init()

LIFF-apps-transition

For more information, see Opening a LIFF app from another LIFF app in the LIFF Document.

# The error that LIFF URLs are redirected to unexpected URLs was fixed

An additional information (path/?key=value) specified in a LIFF URL is included in the liff.state query parameter for the primary redirected URL. When the liff.state query parameter contains an additional information, it might be redirected to an unexpected secondary redirected URL as follows.

Conditions that cause this error
  • When the liff.state query parameter doesn't begin with /
  • When setting Methods for converting additional information in the LIFF URL to Replace (Backward compatibility mode)

For example, if Endpoint URL is set to https://example.com and the liff.state query parameter is assigned to path, it was redirected to https://example.compath because the domain name and the path were not separated by /.
In the LIFF v2.4.0, this error has been fixed so that the URL above is now correctly redirected to https://example.com/path.

For more information on behaviors when accessing a LIFF URL, see Behaviors from accessing the LIFF URL to opening the LIFF app.

# liff.permanentLink.createUrl() error was fixed

When information, such as query parameter (?key=value) or URL fragment (#URL-fragment), was included in the LIFF endpoint URL, on occasion, the additional information section was not accurately reflected in the permanent link when liff.permanentLink.createUrl() was executed. This error has been fixed.

# The error of fragment not being included in the secondary redirct URL was fixed

When a fragment was included in the LIFF endpoint URL or LIFF URL, regardless of settings based on Methods for converting additional information in the LIFF URL, the secondary redirect URL would not include a fragment. This error has been fixed.

For more details on the secondary redirect URL or how it is affected by settings based on Methods for converting additional information in the LIFF URL, see the LIFF document Operation from accessing LIFF URL to opening LIFF App.

LIFF v2.3.1 released

We've now released LIFF v2.3.1. The changes in LIFF v2.3.1 are as follows:

There are no feature updates in this release.

# Problems with the LIFF SDK npm package documentation were fixed

We fixed an issue with the npm official site documentation (opens new window) for the LIFF SDK npm package that was experimentally released.

# Installation and usage instructions of the LIFF SDK npm package were moved

We moved the installation and usage instructions of the LIFF SDK npm package from the npm official website (opens new window) to the LINE Developers site. For more information, see Use the npm package.

New feature has been added to the LIFF header

As announced on July 6, 2020, a new feature has been added to the LIFF header.

LIFF header design to be improved

# The LIFF app icon is no longer displayed

The icon in the upper left corner of the LIFF app is no longer displayed.

# The share button has been added

LIFF apps with the size of the LIFF app view set to Full include a share button in the header. When a user taps the share button, the following options appear:

Item Description
Share Shares the URL of the current page via a LINE message.
Refresh Reloads the current page.

Enable Module mode of the LIFF app in the LINE Developers Console to hide the share button. For more information, see Adding a LIFF app to your channel.

Operating environment

The share button will be available on LINE versions 10.12.0 or later for iOS and Android.

We will continue to improve the quality of the services we provide to our developers and we greatly appreciate your understanding.

Notice about service outage for LINE Front-end Framework (resolved)

We'd like to inform you about a service outage regarding LINE Front-end Framework. The issue has now been resolved but we sincerely apologize for any inconvenience that this may have caused.

# Date and time

Date: July 13, 2020
Time: 11:44–17:26 JST (GMT+9)

# Cause of the outage

Issue with our servers.

# Details

During the date and time stated above, there was an issue with our server that caused an error message to display when creating a new LIFF app. Although an error message was displayed, new LIFF apps were being created. We have already completed the recovery process.

We will continue to improve the quality of the services we provide to our developers and we greatly appreciate your understanding.

New feature will be added to the LIFF header

We plan to make changes to the LIFF header specifications after mid-July 2020.

LIFF header design to be improved

# The LIFF app icon will no longer be displayed

The icon in the upper left corner of the LIFF app will no longer be displayed.

# The share button will be added

LIFF apps with the size of the LIFF app view set to Full will include a share button in the header. When a user taps the share button, the following options will appear:

Items Description
Share Shares the URL of the current page via a LINE message.
Refresh Reloads the current page.

You can hide the share button by changing the settings of the LIFF app in the LINE Developers Console. This option will be added in the future.

Operating environment

The share button will be available on LINE versions 10.12.0 or later for iOS and Android.

# Scheduled date of specification change

The specification change is scheduled to take place in mid-July 2020 or later.

The content and date of the specification change is subject to change without notice. We will continue to improve the quality of the services we provide to our developers and we greatly appreciate your understanding.

LIFF SDK released as an npm package

Until now, to include the LIFF SDK in a LIFF app, it was necessary to Specify the CDN path.

Today, we released the LIFF SDK npm package on a trial basis. Now you can use npm and Yarn to install the LIFF SDK.

For more information on the LIFF SDK npm package, see https://www.npmjs.com/package/@line/liff (opens new window).

The available LIFF SDK versions as an npm package is v2.3.0 or later. The features of future LIFF SDK versions will be announced in Release Notes in the LIFF Documentation.

npm package trial

The npm package is available on a trial basis. It may be changed or deleted in the future without notice.

LINE's APIs now support TLS 1.3

Added July 30, 2020

For access to the APIs from outside Japan, TLS 1.3 will be available after August 4, 2020. For more information, see the news on July 30, 2020, LINE's APIs will support HTTP/2.

LINE's APIs now support TLS 1.3.

# Domain names subject to the update

  • api.line.me
  • api-data.line.me
  • access.line.me

# SSL/TLS supported protocol versions

See this table for the differences before and after the update:

Protocol version Before update After update
TLS 1.3
TLS 1.2
TLS 1.1
TLS 1.0
SSL 3.0
SSL 2.0

# Impact

If you are using any of the above APIs, please confirm that your app can communicate using the updated supported protocol versions.

# Transition period

  • For access from Japan: TLS 1.3 is available after July 1, 2020.
  • For access from outside Japan: TLS 1.3 is available after August 4, 2020.

Support for TLS 1.0 and TLS 1.1 will be discontinued in the future. The discontinuation schedule is undecided. We will make an announcement as soon as it is decided.

We will continue to improve the quality of the services we provide to our developers and we greatly appreciate your understanding.

LIFF v2.3.0 released

We've now released LIFF v2.3.0. The changes in LIFF v2.3.0 are as follows:

# You can now use paths and query parameters in the LIFF endpoint URL

As announced before, you can now use paths (/path) and query parameters (?key=value) added to the LIFF endpoint URL in the LIFF tab of the LINE Developers Console.

Existing LIFF apps aren't effected until the setting is changed

It's necessary to change the setting in LINE Developers Console to use the new specs in existing LIFF apps. Existing LIFF apps aren't affected by the new spec until the setting is changed.

Methods for converting additional information in the LIFF URL

To use the new specs, set Methods for converting additional information in the LIFF URL to Concatenate.
Don't change the setting if your existing LIFF app doesn't support the new specs. If setting to Replace (Backward compatibility mode), the LIFF app isn't affected by the new specs.

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

When executing the liff.permanentLink.createUrl() method, an exception is thrown if the current page URL doesn't start with the URL specified in Endpoint URL.

try {
    const myLink = liff.permanentLink.createUrl()
}
catch (err) {
    console.log(err.code + ':' + err.message);
}

Especially when setting Methods for converting additional information in the LIFF URL to Replace (Backward compatibility mode), the paths and query parameters (/2020campaign/?key=value) specified in Endpoint URL may not be included in the secondary redirect URL. In this case, you can't get a permanent link because the liff.permanentLink.createUrl() method meets the above conditions.

For more information, see liff.permanentLink.createUrl() in the LIFF v2 API reference.

# You can now get the send results of liff.shareTargetPicker()

As announced on April 21, 2020, you can now get the send results of liff.shareTargetPicker().

Before the spec change, the LIFF app was able to confirm whether the target picker was displayed, but not whether the message was sent after that.

After the change, the LIFF app is able to check whether the message has been sent, so you can change the behavior of the LIFF app depending on the user's situation.

Note
  • The return value of liff.shareTargetPicker() is changed due to this spec change.
  • This spec change doesn't affect users using LINE 10.3.0 - 10.10.0.

# Sample code for this spec change

We recommend you to handle the return value according to the LINE versions that users are using as shown below:

if (liff.isApiAvailable('shareTargetPicker')) {
  liff.shareTargetPicker([
    {
      'type': 'text',
      'text': 'Hello, World!'
    }
  ])
    .then(function (res) {
      if (res) {
        // succeeded in sending a message through TargetPicker
        console.log(`[${res.status}] Message sent!`)
      } else {
        const [majorVer, minorVer] = (liff.getLineVersion() || "").split('.');
        if (parseInt(majorVer) == 10 && parseInt(minorVer) < 11) {
          // LINE 10.3.0 - 10.10.0
          // Old LINE will access here regardless of user's action
          console.log('TargetPicker was opened at least. Whether succeeded to send message is unclear')
        } else {
          // LINE 10.11.0 -
          // sending message canceled
          console.log('TargetPicker was closed!')
        }
      }
    }).catch(function (error) {
      // something went wrong before sending a message
      console.log('something wrong happen')
    })
}

For more information, see liff.shareTargetPicker() in the LIFF v2 API reference.

# An error code returned by liff.sendMessages() added

Previously, if passing the wrong parameters to liff.sendMessages(), 400 was returned as the error code of LiffError. After the spec change, INVALID_ARGUMENT is returned instead.

As long as the processing isn't split by error codes, this spec change doesn't effect your LIFF app.

Before the spec change:

liff.sendMessages([
  {
    type: 'text',
    text: 'Hello, World!'
  }
])
  .then(() => {
    console.log('message sent');
  })
  .catch((err) => {
    // Returns "400" if invalid arguments are passed
    if (err.code === "400") {
      console.log("message format error!");
    }
  });

After the spec change:

liff.sendMessages([
  {
    type: 'text',
    text: 'Hello, World!'
  }
])
  .then(() => {
    console.log('message sent');
  })
  .catch((err) => {
    // Returns "INVALID_ARGUMENT" if invalid arguments are passed
    if (err.code === "INVALID_ARGUMENT") {
      console.log("message format error!");
    }
  });

For more information, see Error details in the LIFF v2 API reference.

發布 LIFF v2.2.0 追加的 LIFF error code

關於下列的方法,當 Promise 被 reject 時皆已追加 LiffError code 的資訊於其中,以便讓錯誤訊息更容易被理解。

更多訊息,請見各方法的Error Response說明:

已發布永久鏈結的 API 至文件上

LIFF SDK 能夠為當前的頁面建立一個永久鏈結。 我們將會發布建立永久鏈結的方法並放置於API 文件上。

  • liff.permanentLink.createUrl()
  • liff.permanentLink.setExtraQueryParams()

這些 API 已包含在最新的 LIFF SDK 中,因此當前 LIFF SDK 的版本不需變動。

更多關於取得永久連結的資訊,請參考LIFF技術文件中的Get a permanent link for the current page

[更新] 近期內你將可以在LIFF endpoint URL中增加路徑(path)功能

2020年5月29日註記

這項規格更動原本預計在2020年5月的最後一週施行,但因考量到對現有LIFF app的影響,我們將改採取下列措施:

  • 如2020年5月20日的通知內容,我們將在endpoint URL中新增使用路徑的功能。
  • 我們計畫以不影響現有LIFF app的方式來新增此規格。
  • 規格更動預計於2020年6月下半施行。

對於重複的規格變動所造成混淆,我們致上誠摯的歉意。

目前開發者可在LINE Developers Console的LIFF tab的URL後輸入路徑 (/path)、query parameters (?key=value)與URL fragments (#URL-fragment),但僅有Domain Name與URL中的query parameters會被使用。

隨著接下來的更新內容,LIFF endpoint URL將會有以下更動:

  • 可使用路徑 (/path)。
  • 不可再輸入URL fragment (#URL-fragment)。

舉例而言,如果您在Heroku部屬LIFF app,您可以在LINE Developers Console的基本資訊中輸入https://{Heroku app name}.herokuapp.com/path/?key=value作為Endpoint URL

附有路徑的LIFF URL追加至console

URL scheme請務必使用https。

能在console中輸入的路徑(path)意味著可以降低發布新頁面所需的時間。例如,當前發布頁面為活動頁面時,您可以直接在endpoint URL中輸入您的活動頁面網址https://example.com/2020campaign上去。

注意

對於在console中註冊endpoint URL以及用來開啟LIFF app的URL scheme,兩者URL fragment的使用條件並不相同。請多加留意避免混淆。

Endpoint URL:
https://example.com/2020campaignhttps://example.com/2020campaign/?key=value
不可增加URL fragment。

用來開啟LIFF app的URL scheme:
https://liff.line.me/{liffId}/path_A/path_B/#URL-fragment
可以加上URL fragment。

欲知更多巧參閱LIFF的技術文件中關於Adding a LIFF app to your channel的部分。

對於舊有規格所造成的混淆,我們致上真摯的歉意。我們將會持續改善提供給開發者的服務品質,同時感謝您的諒解。

# 預計變更規格的日期

2020年6月下半。

在LIFF app中已可使用OGP標籤

目前可以在LIFF app中的各個頁面中設定OGP標籤。例如在聊天室內分享您的LIFF app連結(https://liff.line.me/{liffId})時,您將可以隨意設置標題、說明、與縮圖等等。

下方為LIFF可支援的OGP標籤。 更多關於OGP標籤的訊息,請參考The Open Graph protocol (opens new window)

<html lang="ja" prefix="og: http://ogp.me/ns#">
<meta property="og:title" content="The title">
<meta property="og:type" content="`website`, `blog`, or `article`">
<meta property="og:description" content="A one to two sentence description">
<meta property="og:url" content="The URL">
<meta property="og:site_name" content="The name that represents the overall site">
<meta property="og:image" content="An image URL">
注意

當使用line://app/{liffId}(不建議使用)的形式分享連結時,OGP標籤將會被忽略。

LIFF版本政策與生命週期已釋出

為了使各個LIFF版本的目的更明確,我們將公開LIFF版本政策。 我們同時也公開了各個主要版本的生命週期,讓使用者可以為LIFF的版本升級做適當的準備。

請使用最新版本的LIFF SDK

2019年10月16日的通知,LIFF v1將會被中止。 在中止後,您將無法使用LIFF v1來開啟LIFF app。

更多關於主要版本的生命週期與LIFF v1的中止時間,請參考LIFF技術文件中的LIFF SDK生命週期

# LIFF版本政策

自LIFF v2.2.0開始,LIFF的版本號將會遵循Semantic Versioning (opens new window) (SemVer)所設定的規範。

SemVer定義了下方的版本格式:

主版號(MAJOR).次版號(MINOR).修訂號(PATCH)

舉例而言,在v1.2.3, 1是主版號,2是次版號,3則是修訂號。

LIFF版本政策解釋了主要版本的生命週期並就各個版本(主要版本、次要版本、修訂版本)對開發者的意義提出說明。

# LIFF SDK (sdk.js)的更新政策

自LIFF v2.1.13發布後,我們準備了兩種CDN路徑。 在將LIFF SDK整合至LIFF app時,請指定符合您目的的CDN路徑。

CDN路徑 說明
CDN edge路徑 僅指定主要版本的方法。 不用更新您的LIFF app,也可以使用最新版本的LIFF SDK。
例: https://static.line-scdn.net/liff/edge/2/sdk.js
CDN固定路徑 可指定至修訂版本的方法。只要未更新LIFF app,即可繼續使用指定的修訂版本。由於其不會自動更新,故不會受到LIFF SDK升級的影響。
例: https://static.line-scdn.net/liff/edge/versions/2.1.13/sdk.js

使用Edge路徑的範例:

<script charset="utf-8" src="https://static.line-scdn.net/liff/edge/2/sdk.js"></script>
關於維持向下相容的CDN路徑

為了確保已上線的LIFF app運作,我們將提供下列CDN路徑來維持LIFF SDK的作業。使用此CDN路徑的LIFF SDK會與CDN edge路徑的LIFF SDK同一版本。

維持向下相容的CDN路徑為:
https://static.line-scdn.net/liff/edge/2.1/sdk.js

注意

我們建議您將LIFF app中向下相容的CDN路徑改為CDN edge路徑。因為無論LIFF SDK的生命週期預計為何時,使用向下相容的CDN路徑都可能遭到中止。

待方針確立後我們會盡速通知。

在LIFF技術文件中查看更多關於LIFF版本政策的資訊。

LIFF v2 已提供 liff.getLineVersion() 與 liff.id 的用法

目前已將方法 - liff.getLineVersion() 與屬性 - liff.id 新增至 LIFF v2 當中。

liff.getLineVersion() 將允許取得使用者的 LINE 版本。

如果使用者是藉由LINE內建瀏覽器開啟LIFF app,該使用者的LINE版本即會以字串回傳。如果使用者是以外部瀏覽器開啟LIFF app,則會回傳null

liff.id 的屬性為 liff.init() 初始化後所持有的 LIFF app ID (字串型態)。

欲了解更多請參考LIFF v2 API reference中的liff.getLineVersion()liff.id

提醒:關於 liff.shareTargetPicker() 回傳值的修改通知

由於我們將會更改 LIFF v2 的 liff.shareTargetPicker() 回傳值。 若您目前的實作正使用到此功能,請參考相關規格並修改。

注意

目前尚未確定關於變更後的 liff.shareTargetPicker() 回傳值規格。

# 概要

在規格改變前,LIFF app 僅可確認 target picker 是否已顯示,但無法確認訊息是否已被傳送。

在規格改變後,LIFF app 不僅可以確認訊息是否已被傳送,並且能配合使用情境,進行相關功能的實作。

# 尚未變更規格之前

# 範例

if (liff.isApiAvailable('shareTargetPicker')) {
  liff.shareTargetPicker([
    {
      type: "text",
      text: "Hello, World!"
    }
  ])
    .then(
      console.log("ShareTargetPicker was launched")
    ).catch(function(res) {
      console.log("Failed to launch ShareTargetPicker")
    })
}

# 語法

liff.shareTargetPicker(messages)

# 回傳值

回傳Promise物件。

當 target picker 顯示後,Promise 會被 resolve。

如果 target picker 在顯示前發生錯誤,除了 Promise 會被 reject 外,並且會發送 LiffError。更多關於 LiffError 物件的資訊,請參考 LIFF SDK errors 文件

注意
  • 若使用者在顯示 target picker 時未選擇傳送目的地,將無法確認 target picker 顯示後的情況。
  • Promise 被 resolve 與 reject 的 callback 函數中,LIFF app 在某些裝置中無法使用 alert()

# 規格變更之後

# 範例

if (liff.isApiAvailable('shareTargetPicker')) {
  liff.shareTargetPicker([
    {
      type: "text",
      text: "Hello, World!"
    }
  ])
  .then(function(res) {
    if (res) {
      // succeeded to send message in TargetPicker
      console.log(`[${res.status}] Message [${this.msgType}] is sent!`)
    } else {
      // canceled to send message
      console.log('TargetPicker was closed!')
    }
  }).catch(function(error) {
    // something wrong happened before sending message properly
    console.log('something wrong happen')
  })
}

# 語法

liff.shareTargetPicker(messages)

# 回傳值

回傳Promise物件。

如果訊息被正確傳送,Promise 會被 resolve 並發送含有成功狀態的訊息。

如果使用者在訊息被傳送前取消或關閉 target picker,Promise 會被 resolve,但不會發送含有成功狀態的訊息。

如果 target picker 在顯示前發生錯誤,除了 Promise 會被 reject 外,並且會發送 LiffError。更多關於 LiffError 物件的資訊,請參考 LIFF SDK errors 文件

之後我們預計會隨著規格的變更,並修改 Error 的定義。

注意

Promise 被 resolve 與 reject 的 callback 函數中,LIFF app 在某些裝置中無法使用 alert()

# 預計規格變更的時間

未定。

LIFF v2已追加liff.isApiAvailable()

LIFF v2已追加liff.isApiAvailable()。 可確認指定的API是否能在LIFF應用程式啟動的環境下使用。

注意

可指定的API有限。 目前的適用對象為liff.shareTargetPicker()。 今後在可於liff.isApiAvailable()指定的API增加時,將再次通知。

# 確認可否使用Target Picker

透過事先執行liff.isApiAvailable(),在不可使用Target Picker的環境下執行liff.shareTargetPicker()之際,可避免用戶畫面顯示錯誤訊息。

if (liff.isApiAvailable('shareTargetPicker')) {
  liff.shareTargetPicker([
    {
      type: "text",
      text: "Hello, World!"
    }
  ])
    .then(
      alert("ShareTargetPicker was launched")
    ).catch(function(res) {
      alert("Failed to launch ShareTargetPicker")
    })
}

詳情請參閱《LIFF v2 API Reference》的「liff.isApiAvailable()」。

liff.shareTargetPicker() and liff.ready added to LIFF v2

We added liff.shareTargetPicker() and liff.ready to LIFF v2.

# liff.shareTargetPicker()

Execute the liff.shareTargetPicker() method to display the target picker (screen for selecting a group or friend) and send the message created by the developer to the selected target. This message appears to your group or friends as if you had sent it.

target picker

For more information, see Sending messages to a user's friend (share target picker) in the LIFF documentation.

Target picker operating environment

Target picker is supported by LINE 10.3.0 for iOS and Android.

# liff.ready

With liff.ready, you can get the Promise object that resolves when you run liff.init() for the first time after starting the LIFF app. If you use liff.ready, you can execute any process after the completion of liff.init().

For more information, see liff.ready in the LIFF v2 API reference.

LIFF v1 API 及停用日期變更

日前新聞宣佈 LIFF v1 Server API 將於 2020 年 3 月 31 日停用,因考量用戶意見,將繼續提供相關 API。

LIFF v1 停用日期確認後,將即時發佈相關通知。同時,請 v1 用戶儘快改用 v2。

功能 原訂停用日期 新的停用日期
LIFF v1 Client API 未來將停用 未來將停用 (此計畫維持不變)
LIFF v1 Server API 2020 年 3 月 31 日停用 繼續提供服務
未來仍將停用 LIFF v1

如同 2019 年 10 月 16 日新聞所述,LIFF v1 將被停用,請改用最新版本。

使用者無法在 Messaging API channel 新增 LIFF app

如同 2019 年 11 月 11 日新聞所述,由於 LIFF v2 功能改善,使用者無法繼續在 Messaging API channel 新增 LIFF app。

欲了解已在 Messaging API channel 新增的 LIFF app 將受到哪些限制,以及如何改將 LIFF app 綁定至 LINE Login channel,請查看 2019 年 11 月 11 日發佈的新聞內容。

LIFF v1 Server API 將於 2020 年 3 月 31 日停用

LINE Front-end Framework (LIFF) v1 Server API 將於 2020 年 3 月 31 日起停止使用,下列 API 功能將被移除:

請使用最新版 LIFF

即日起請改用 LIFF v2。如同 2019 年 10 月 16 日新聞所述,LIFF v1 即將停用。

# 請使用 LIFF v2

上方所列的 Server API 功能可透過 LINE Developers Console 繼續使用,欲了解如何在 channel 新增 LIFF app,請查看:

如欲透過 LINE Developers Console 使用上列其他 3 項 Server API 功能,請點選該連結、查看技術文件。

LINE 團隊將持續改善服務品質,感謝您的配合。

如使用已中止的 LIFF SDK API,請調整程式碼

如同 2019 年 11 月 29 日新聞所述,基於特定技術考量,下列使用於 iOS 的 LINE (v9.19.0 或之後版本) API 功能已被暫停使用:

  • liff.scanCode()
  • liff.bluetooth.*

自今日起,end user 於 iOS 使用的 LINE (v9.19.0 或之後版本) LIFF app 部分 API 功能如下:

API 功能
liff.scanCode() API 為 undefined
liff.bluetooth.* 如呼叫 liff.initPlugins(['bluetooth']) 時,Bluetooth plug-in 無法初始化,將顯示 FORBIDDEN 錯誤訊息。

如開發者使用 liff.scanCode(),強烈建議參考上述說明,確認功能可正常運作。

調整前:

liff.scanCode().then(result => {
  // result = { value: '' }
});

調整後:

if (liff.scanCode) {
	liff.scanCode().then(result => {
	  // result = { value: '' }
	});
}

如欲取得更多相關訊息,請至 LIFF v2 API reference

LINE 團隊正積極改善服務品質,造成不便敬請包涵!

部分 LIFF 功能暫停使用

基於特定技術考量,下列 LIFF 功能已被暫停使用;恢復使用後,將即時發佈相關通知:

  • liff.scanCode()
  • liff.bluetooth.*

# 受影響之作業環境

環境 版本
LINE for iOS 上述功能暫時無法於 iOS 9.19.0 或之後版本中取得。
LINE for Android 目前不受影響,但近期內將發佈相關新聞。

LINE 團隊正積極排除此問題,造成不便敬請包涵!

停止在 Messaging API channel 新增 LIFF app

LIFF v2 即將改以 LINE Login channel 為核心。此外,將全面停止開發者在 Messaging API channel 新增 LIFF app。強烈建議開發者改在 LINE Login channel 新增 LIFF app。

# 變更生效日期

2020 年 2 月

# 影響

Channel 類型 影響
LINE Login channel 未受影響。
Messaging API channel 變更後,將無法再在 Messaging API channel 新增 LIFF app。原本綁定 Messaging API channels 的 LIFF app 於變更後仍可使用。
請勿再在 Messaging API channel 新增 LIFF app

目前,開發者仍可在 Messaging API channel 新增 LIFF app,然而,基於以下限制,強烈建議開發者停止繼續在 Messaging API channel 新增 LIFF app:

  • Bot link 無法使用。
  • LIFF 延伸功能可能不受支援。
  • LIFF app 未來可能無法繼續使用。

在 LINE Login channel 新增的 LIFF app 並無以上限制,且可使用 LIFF v2 所有功能。

# 將 LIFF app 綁定至 LINE Login channel

為繼續使用原本綁定 Messaging API channel 的 LIFF app,請在 LINE Login channel 新增該 LIFF app。新增後,LINE Developers Console 將發佈新的 LIFF app ID。因此,請注意:

  • 使用 LIFF v2 的開發者,請改用 liff.init()所指定的 LIFF app ID。
  • LIFF 上線所使用的 LIFF URL(例如:line://app/1234567890-AbcdEfgh)將被變更。
請移除綁定 Messaging API channel 的 LIFF app

為避免混淆,在 LINE Login channel 新增 LIFF app 後,請刪除原本綁定 Messaging API channel 的 LIFF app。

LIFF v2 正式上線

LINE Front-end Framework (LIFF) v2 為 LINE 運作 app 的平台。

請使用最新版 LIFF

LIFF v1 未來將被終止使用。

# 現在起,LIFF app 可於外部瀏覽器中執行

使用 LIFF v1,LIFF app 只能在 LINE app 瀏覽器中執行。使用 LIFF v2,LIFF app 則可於外部瀏覽器中執行。開發者可使用與一般 web 應用相同的開發環境進行 LIFF app 開發。

# 取得用戶資料與 email

由於與 LINE Login v2.1 的相容性已獲得改善,現在,開發者可從 LINE 平台取得用戶 ID 和 email address。LIFF app 可使用此數據,提供與用戶資料和發送電子郵件相關的功能。

此外,LIFF app 在外部瀏覽器中執行時,開發者仍可使用 LINE Login (網頁登入流程),這也代表即使 LIFF app 正在外部瀏覽器中執行,開發者也可使用相同的訊息。

# 讀取 QR code

開發者可使用 LINE QR code reader 取得用戶所讀取的字串。

# 取得 LIFF app 設定詳細資料

開發者可取得下列有關 LIFF app 設定的詳細資料:

  • 執行 LIFF app 的作業系統 (iOS / Android / 外部瀏覽器)
  • LIFF app 是否正在 app 內的瀏覽器中執行 (是 / 否)
  • 語言設定

如欲取得更多資料,請至 LINE Front-end Framework

Notice about system maintenance

We're performing system maintenance at the below time. We apologize for any inconvenience.

# Scheduled maintenance time

September 26, 2019 16:20-16:50 JST (+9 GMT)

The maintenance will only last a few seconds and will take place somewhere in this time window.

# Impact

Messaging API, LINE Login, and LIFF operations may result in errors. Specifically, the following events can occur:

  • Messaging API (https://api.line.me/v2/bot/*) returns an error with status code 500.
  • An error with status code 500 is returned when a user logs in with LINE Login or starts a LIFF app.

Improved consent screen in LINE Front-end Framework

We have improved the consent screen bundled with the LINE Front-end Framework (LIFF). The improvement is automatically applied to all LIFF apps. There's no need for additional development work.

New consent screen

As before this update, the user can choose to not allow the LIFF app to send messages to chats. But if they do so, unlike before, the consent screen will reappear the next time the user launches the LIFF app.

You can get access tokens through LIFF SDK

We added the liff.getAccessToken() method to the LIFF SDK.

Use the access token to interact with the Social API to access user profile data on the LINE Platform.

For more information, see Getting the user's access token.

Correction to documentation

There were errors in the news release and documentation for the new LIFF server API to update a LIFF app. We apologize for any inconvenience.

# News

【Incorrect】 The HTTP request to the API endpoint to update a LIFF app is changed from PUT to PATCH. Now you can partially update the properties of your LIFF apps.

【Correct】 The API endpoint for updating a LIFF app is changed. Now you can partially update the properties of your LIFF apps.

# API reference

【Incorrect】 PATCH https://api.line.me/liff/v1/apps/{liffId}

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

For more information, see Update LIFF app.

Renewed LIFF server API

Now you can set the following properties to your LIFF apps.

  • description property
  • features.ble property

The HTTP request to the API endpoint to update a LIFF app is changed from PUT to PATCH. Now you can partially update the properties of your LIFF apps.

For more information, see the following sections:

LIFF apps can now be added with the LINE Developers Console

Now you can add LIFF apps with the LINE Developers Console. As before, you can still add LIFF apps with the LIFF server API.

For more information, see Adding a LIFF app.

The maximum number of LIFF apps has been increased

Now you can add up to 30 LIFF apps for one channel. The previous maximum number was 10.

For more information, see Add LIFF app in the LIFF API reference documentation.

Notice about service outage for LINE Front-end Framework (resolved)

We'd like to inform you about a service outage regarding LINE Front-end Framework. The issue has now been resolved but we sincerely apologize for any inconvenience that this may have caused.

# Date and time of recovery

Date: June 21, 2018 around 17:30 JST (GMT+9)

# Cause of the outage

Issue with our servers.

# Details

When a LIFF app was added to a channel, the permission to retrieve the user's email address was revoked if it had been granted to the channel. Please check if the email permission has been revoked or not from the LINE Developers Console. Request the permission again if it has been revoked.

We will continue to improve the quality of the services we provide to our developers and we greatly appreciate your understanding.

LINE Front-end Framework released

LINE Front-end Framework (LIFF) is a platform for web apps that run within LINE.

When launching a web app (LIFF app) registered in LIFF in LINE, the LIFF app 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 behalf of the user.

For more information, see LINE Front-end Framework.