# News: Articles for #Messaging API

Get all valid channel access tokens v2.1 endpoint and content removed

As announced on July 01, 2020, the Get all valid channel access tokens v2.1 API endpoint for Messaging API has been removed. We've also removed all content related to this endpoint from this site.

When Issuing the channel access token v2.1, a unique key ID (key_id) paired with the channel access token is also returned. You can use the newly added Get all valid channel access token key IDs v2.1 endpoint to get an array of key IDs paired with the currently valid channel access tokens. You can verify the validity of channel access tokens by comparing the returned key IDs with pairs of channel access tokens and their IDs stored in a database.

Learn more about Issue channel access token v2.1 in the Messaging API documentation.

Notice of failure of some analytics APIs (Partially resolved)

These problems occurred in the Messaging API, but it has been partially resolved. We apologize for any inconvenience caused to our customers.

# Date and time of outage

Issue 1: July 21, 2020 around 7:00 - 17:00 (GMT+9)

Issue 2: July 16, 2020 onwards (GMT+9)

# Situation

# (Resolved) Issue 1

When premium and verified account users called the Get number of followers API endpoint, the endpoint returned an incorrect number of followers for July 21, 2020.

This issue is now resolved and you can get the correct number for July 21, 2020.

# (Limitation) Issue 2

Some LINE Official Accounts (less than 0.5%) that used the Get number of followers API endpoint from July 16, 2020 to July 20, 2020 may have gotten incorrect numbers returned for followers, targetedReaches, and blocks.

The affected LINE Official Accounts may have had these issues:

  • If you added friends during this period, they aren't added to the total amount of friends.

  • The number of followers during this period is returned with less than the actual value.

For issue 2, the correct value can't be restored.

Note

Neither issue has any effect on the total message delivery count.

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 sending webhook events (resolved)

We'd like to inform you about a service outage regarding the Messaging API. The issue has now been resolved but we sincerely apologize for any inconvenience that this may have caused.

# Date and time of outage

June 29, 2020 13:20 JST (GMT+9) - July 14, 2020 17:42 JST (GMT+9)

# Cause of the outage

Due to the detection of unauthorized communications in our network, we've blocked some communications as a preventive measure.

# Details

During the date and time stated above, webhook events couldn't be sent to some bot servers (Webhook URLs) using ngrok.

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

Improved Messaging API reference and side menu

The LINE Developers site's Messaging API reference page, due to the large amount of endpoints, was long and difficult to navigate.

We received feedback about the navigation pain points developers faced while navigating the Messaging API reference page. In response, we've made these improvements to provide a better user experience.

# You only see the categories you select

All endpoints are divided into categories such as Webhooks and OAuth.

You can see the overview for each category and select Show to display the category's endpoints.

Messaging API Webhooks overview

# Side menu shows current page location

When you scroll through the page, the highlighted location on the side menu automatically reflects your current location in green.

For example, when you scroll through the page and see the "response" section under the "Webhooks" category, "response" under "Webhooks" is also highlighted in the side menu.

Webhook location on page is reflected in side menu

If you're lost on the page, you can now refer to the side menu to find your location.

Developers who use the browser's in-page search should use the built-in search function to find the endpoint. You can search endpoints by title search or full-text search.

Search for an endpoint

# Tell us your thoughts about the LINE Developers site

If you use the new Messaging API Reference and notice issues or find it difficult to use, select "Was this page helpful?" in the bottom right corner and let us know.

Feedback form title

Thanks to everyone for their valuable feedback. We read each message we receive.

We will continue to improve the quality of the services we provide to our developers. Thank you for your understanding.

Get all valid channel access tokens 2.1 is deprecated

As announced on June 22, 2020, the Get all valid channel access tokens v2.1 API endpoint is now deprecated and will be permanently removed on July 29, 2020.

If you're using this endpoint, change your bot to use the newly added Get all valid channel access token key IDs v2.1 endpoint by the specified EOL date.

Learn more about Issue channel access token v2.1 in the Messaging API documentation.

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.

Beacon Leave Event to be deprecated at the end of 2020

July 8, 2020

We clarified the contact information. We apologize for any inconvenience this may have caused you.

As announced previously, the leave event of Beacon Event, will be deprecated. Please refer to the following schedule:

Schedule Description
End of 2020 Leave event will be deprecated.
Early January of 2021 Webhook transmission will cease
Tip

We will continue supporting other Beacon events (enterevent, bannerevent, or stayevent).

# Impact

Please adjust your service to use the stay event instead of the leave event for detecting when users exit the reception range of Beacon.

beacon.type Description
leave [To be deprecated at the end of 2020] User left the reception range of Beacon.
stay User is currently within the reception range of Beacon.
This event is sent repeatedly at a minimum interval of 10 seconds.

If you wish you use the stay event, contact your sales representative or contact our Sales partners.

We apologize for any inconvenience the deprecation of the leave event may have caused. LINE will continue to improve the quality of its services to its customers. Thank you for your understanding.

The key IDs to identify Channel Access Tokens have been added

The endpoint to Get all valid channel access tokens v2.1 returns re-encrypted channel access tokens for security reasons. Even for the same channel access token, the value changes when issuing and getting it, making it difficult to manage and identify the token.

With this update, when Issuing the channel access token v2.1, a unique key ID (key_id) paired with the token is also returned. You can use the newly added Get all valid channel access token key IDs v2.1 endpoint to identify paired channel access tokens.

Plan to deprecate endpoint

Due to this update, we'll soon deprecate the Get all valid channel access tokens v2.1 endpoint (early July). If you are using this endpoint, change your bot to use the newly added Get all valid channel access token key IDs v2.1 endpoint instead.

Learn more about Issue channel access token v2.1 in the Messaging API documentation.

Messaging API update for June 2020

We added new endpoints to the Messaging API. These are the new features added to this update:

Endpoints

This is a summary of each new feature. For details, see each new feature in the Messaging API reference.

# Get group summary

Gets the group ID, group name, and group icon URL of a group where the LINE Official Account is a member.

For more information, see Get group summary in the Messaging API reference.

# Get number of users in a group

Gets the count of users in a group. You can get the user in group count even if the user hasn't added the LINE Official Account as a friend or has blocked the LINE Official Account.

For more information, see Get number of users in a group in the Messaging API reference.

# Get number of users in a room

Gets the count of users in a room. You can get the users in room count even if the user hasn't added the LINE Official Account as a friend or has blocked the LINE Official Account.

For more information, see Get number of users in a room in the Messaging API reference.

Flex Message Simulator tutorial now available

We published our first tutorial about using the Flex Message Simulator.

Following this tutorial, you will obtain hands-on experience and knowledge about how to use the Flex Message Simulator. By the end of the tutorial, you will have created this digital business card using Flex Message:

Final Output

We encourage you to take this opportunity to learn to use the Flex Message Simulator and create your own unique Flex Message.

Messaging API update for May 2020

We made several improvements to the Messaging API.

# Message character limit and media file usage conditions have been changed

The character limit for text messages and the conditions for media files that can be used have changed. See this table for a comparison of the previous and current situation:

  • Text message

    Items Previous Current
    Max character limit 2000 5000
  • Rich menu object (Image)

    Items Previous Current
    Image size
    (width x height)
    2500px × 1686px
    2500px × 843px
    1200px × 810px
    1200px × 405px
    800px × 540px
    800px × 270px
    800px or more x 2500px or less*

    * The width/height aspect ratio should be at least 1.45.

  • Image message (Image)

    Items Previous Current
    File format JPEG JPG, JPEG, PNG
    Max image size 4096px × 4096px No limit
    Max file size 1MB 10MB
  • Video message (Video)

    Items Previous Current
    Max length 1 minute No limit
    Max file size 10MB 200MB
  • Audio message (Audio)

    Items Previous Current
    Max length 1 minute No limit
    Max file size 10MB 200MB
  • Imagemap message (Image)

    Items Previous Current
    Max file size 1MB 10MB
  • Imagemap message (Video)

    Items Previous Current
    Max length 1 minute No limit
    Max file size 10MB 200MB
  • Image message / Video message / Imagemap message (Preview image)

    Items Previous Current
    File format JPEG JPEG, PNG
    Max image size 240px x 240px No limit

# Getting LINE emoji information from the text object of a webhook event

If the text sent by users contains a LINE emoji, the emojis property of the text message object received by webhook contains information about the used LINE emoji as a LINE Emoji object.

LINE emoji information has been added to the webhook message event object. If the text containing a LINE emoji is sent by users, the emojis property will contain information about the used LINE emoji as a LINE emoji object.

LINE emoji are identified by a productId and emojiId:

{
  "replyToken": "nHuyWiB7yP5Zw52FIkcQobQuGDXCTA",
  "type": "message",
  "mode": "active",
  "timestamp": 1462629479859,
  "source": {
    "type": "user",
    "userId": "U4af4980629..."
  },
  "message": {
    "id": "325708",
    "type": "text",
    "text": "Hello, world! (love)",
    "emojis": [
      {
        "index": 14,
        "length": 6,
        "productId": "5ac1bfd5040ab15980c9b435",
        "emojiId": "001"
      }
    ]
  }
}

For details, see the Text section in the Messaging API reference.

# Safely retrying a failed API request

If an error occurs when sending a message using the Messaging API, or if the request times out, you may not know if the message was correctly delivered to users. Executing the same request causes users to receive the same message twice if the first request was received correctly.

You can safely retry the same request by adding a retry key (X-Line-Retry-Key) to the HTTP request header.

An arbitrarily generated UUID in hexadecimal notation (example: 123e4567-e89b-12d3-a456-426614174000) is specified as the value of a retry key. No matter how many times the API request containing the same UUID value of a retry key is executed, it is always accepted only once, preventing the same process from being duplicated. The retry key can now be used to design a secure API request retry.

curl -v -X POST https://api.line.me/v2/bot/message/push \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {CHANNEL_ACCESS_TOKEN}' \
-H 'X-Line-Retry-Key: {UUID}' \
-d '{
    "messages": [
        {
            "type": "text",
            "text": "Hello, user"
        }
    ]
}'

For details, see Retrying a failed API request.

「受眾群體」(Audience)與「分析」(Insight)的部分API恢復通知

我們在2020年4月22日發布了[更新] 關於Audience和Insight在一些集成式API中服務故障的問題。上述API現已可在受限制的狀況下使用。

請留意相關訊息的傳送日期與時間,關於建立曝光再行銷的受眾群可能會受限制,以及統計資料可能會有相關回傳值。

  • 訊息發送的時間(JST): ~2020年3月29日,23:59:59
    狀態:現已無限制。

    • 受眾群體已可以創建。
    • 統計資料已可正常回傳。

  • 訊息發送的時間(JST): 2020年3月30日 00:00:00~2020年4月29日23:59:59
    狀態:有限制。

    • 受眾群體無法創建。
    • 統計資料中的 overview.uniqueImpressionmessages[].impression會有相關回傳值。

  • 訊息發送的時間(JST): 2020年4月30日 00:00:00~
    狀態:有限制。

    • 受眾群體已可以創建。但是,如果有使用者在這段時間內使用受限制的LINE版本開啟訊息,該使用者將無法接收到使用受眾群體所送出的新訊息。
    • 統計資料已可正常回傳。但是,統計資料中將不包含使用者在這段時間內利用受限制的LINE版本開啟訊息的次數。

關於更多資訊,請參考下方頁面:

我們將會持續改善我們向各位發開者提供的服務品質,並對於您的理解致上真誠的感謝。

Messaging API服務中斷通知 (已修復)

我們必須通知您關於Messaging API近期發生的服務中斷問題。 所有由Messaging API提供的功能皆有可能受到影響。

這項問題目前已解決。Messaging API自下方的發生時間後已恢復正常運作。對於遲來的通知與此問題所造成的不便,我們致上誠摯的歉意。

# 發生時間

日期: 2020年4月24日

時間: 14:41-17:46 (GMT+9)

# 原因

網路故障

# 影響範圍

所有由Messaging API提供的功能皆有可能受到此問題影響。

LINE將會持續改善我們的服務品質以避免未來發生相關問題。感謝您的諒解。

[更新] 關於 Audience 和 Insight 在一些集成式 API 中服務故障的問題

2020年5月1日更新

在 2020 年 4 月 22 日我們回報了此 API,目前已可在有限制的狀況下使用它。

關於更多訊息,請參考下方頁面:

Messaging API 發生了下列故障的問題。對此造成您的不便,我們致上誠摯的歉意。

# 發生時間

日期: 2020 年 4 月 13 日

時間:約 15:30~ (GMT+9) (持續中)

# 細節

在上述時間發生之後,無法準確計算出曝光再行銷的受眾群的曝光量。

因此我們暫時限制了部分功能的使用。整體來說,我們將會採取以下行動:

我們正積極的調查與修復此問題。

LINE 將會持續改善我們的服務品質以避免未來發生相關問題。感謝您的諒解。

【更新】Messaging API升級(2020年4月)

2020年4月16日更新

2020年4月14日通知的下列Property名稱已變更。

變更前 變更後
sticon emojis
sticon.sticonId emojis.emojiId

Messaging API進行了下列改善。

# 利用文字訊息傳送LINE表情貼

利用Messaging API傳送文字訊息之際,可傳送Unicode定義的表情貼、LINE獨家定義的表情貼(不建議),現在更可傳送LINE表情貼了。

LINE表情貼以productIdemojiId指定。

// 含有LINE表情貼的文字訊息示例
{
    "type": "text",
    "text": "Look at this: $ It's a LINE emoji!",
    "emojis": [
        {
            "index": 14,
            "productId": "5ac1bfd5040ab15980c9b435",
            "emojiId": "001"
        }
    ]
}

詳情請參閱《Messaging API reference》的「文字訊息」。

# 取得用戶語言

取得個人資料端點,既存的用戶個人資料資訊會和languageProperty一起退回。

languageProperty僅會在下列任一情況下退回。

  • 用戶使用在日本建立的LINE帳號,且同意LINE 8.0.0版本之後的隱私權政策
  • 用戶使用在台灣、泰國,或印尼建立的LINE帳號,且同意LINE 8.9.0版本之後的隱私權政策

# Multicast的收訊人數限制已刪除

傳送Multicast訊息 端點原本有限制1分鐘的收訊人數,此限制已在今天刪除。其他速度限制將繼續適用。關於變更前的限制和變更後的差異,請參閱下表。

Bot種類 變更前 變更後
LINE官方帳號綁定的Bot 100,000 Request/分
1,700 Request/秒(※)
2,000,000 收訊人/分
100,000 Request/分
1,700 Request/秒(※)
LINE@帳號綁定的Bot 10,000 Request/分
170 Request/秒(※)
200,000 收訊人/分
10,000 Request/分
170 Request/秒(※)

※1秒單位的速度限制為大量傳送時的大概速度。

不僅如此,傳送Multicast訊息時,最多可指定500筆用戶ID(原為150筆,增加至500筆)。

詳情請參閱《Messaging API reference》的「速度制限」。

Channel Access Token v2.1已上線

Channel Access Token的最新版本已上線。新版本除了能指定Token的有效期限之外,亦可用JSON Web Token(JWT)來取代Channel Secret強化安全性。

建議您使用Channel Access Token最新版本。

JWT的生成方法

可使用任意的JWT函式庫,亦可自己寫Code 由Assertion Signing Key生成JWT。生成JWT是發行Channel Access Token v2.1必要的手續。

# 新追加的API

關於現在可利用的Channel Access Token種類及其不同,請參閱《Messaging API Document》的「Channel Access Token」。

新「訊息貼圖」的資源型態已新增至貼圖訊息的webhook事件

隨著LINE訊息貼圖 (可輸入客製化文字的貼圖)的推出,對用於通知貼圖訊息傳送的webhook事件,我們在其stickerResourceType屬性中新增了PER_STICKER_TEXT

如果一位LINE使用者向您的LINE官方帳號傳送了訊息貼圖,您將會收到一則包含PER_STICKER_TEXT stickerResourceType的webhook事件物件。

更多資訊請查看『Messaging API參考資料』中的貼圖

LINE Beacon已中止於多個版本的服務

March 10, 2020所通知,LINE Beacon已不再適用於LINE的下列版本:

  • 日本: LINE 8.17.0之前的任何版本
  • 台灣: LINE 9.14.0之前的任何版本
  • 泰國: LINE 9.8.0之前的任何版本
  • 印尼: LINE 9.8.0之前的任何版本 (無異動)

# 影響

以上版本的使用者無論是進入或離開LINE Beacon的發送範圍,都將無法被偵測到。

  • Webhook Beacon事件將不會傳送給bot app。
  • 該當使用者將無法看到Beacon橫幅廣告。

更多關於LINE Beacon的資訊,請查看使用Beacons

對於這項改變可能造成的不便,我們致上誠摯的歉意。我們將會持續改善LINE的服務品質。感謝您的諒解。

不建議使用LINE URL scheme 'line://'

由於LINE URL scheme line://可能會產生接管攻擊,因此不建議使用。請改用https://line.me/R/https://liff.line.me/

line://接管攻擊是指使用者在點擊line://時,其他非LINE的app可能會不顧使用者的意願自動開始執行。這項攻擊僅會在特定的情況下發生。

line://將來有可能會受到中止。如有進一步的決定,我們會在此通知。

更多關於LINE URL scheme的資訊,請查看『透過LINE URL scheme使用LINE功能』。

提醒: Endpoint 網域名稱變更通知

如同 2019 年 11 月 8 日新聞所述,部分 Messaging API endpoint 的網域名稱 (domain name) 由 api.line.me 變更為 api-data.line.me.

# 變更網域名稱的 endpoint:

# 影響

使用以上 endpoint 的開發者,請於轉換期限前變更網域名稱。

轉換期結束後,使用以上 endpoint 的舊網域名稱將會顯示 404 錯誤訊息。

如造成任何不便,敬請見諒,感謝配合。

# 轉換期間

2019 年 11 月 8 日 起至 2020 年 4 月 30 日

You can now change the icon and display name of your LINE Official Account

The push/reply API request extension of the Messaging API to change icon and display name of LINE Official Account is now generally available. This was previously an optional feature for corporate users.

As shown by a green frame, you can specify icon or display name when sending a message from LINE Official Account.

Change icon and display name

For more information, see Change icon and display name.

# Properties added to Messaging API

sender.iconUrl for specifying icon and sender.name for specifying display name have been added to Messaging API. The properties can be specified in all the message objects.

For more information about each property, see “Change icon and display name” section of the Messaging API reference documentation.

LINE Beacon no longer supported on several LINE versions from March 25, 2020

LINE Beacon will no longer be supported on the following LINE versions:

  • Japan: Any version before LINE 8.17.0
  • Taiwan: Any version before LINE 9.14.0
  • Thailand: Any version before LINE 9.8.0
  • Indonesia: Any version before LINE 9.8.0 (no change)

This change will take effect from March 25, 2020 to March 26, 2020.

# Influence

Users that use these versions of LINE will not be detected when they enter or exit the reception area of a beacon.

  • Webhook beacon events are not sent to bot apps.
  • The beacon banner is not displayed for the corresponding user.

For more information about LINE Beacon, see Using Beacons.

We apologize for any inconvenience this may have caused. LINE will continue to improve the quality of its services to its customers. Thank you for your understanding.

所有 Narrowcast 及 Audience Management 英文技術文件正式上線

介紹如何透過 Messaging API 發送 Narrowcast 訊息、管理受眾的英文技術文件,已全數上線。

最新英文文件:

之前翻譯為英文的文件 (請見新聞 2020 年 2 月 19 日):

上述 Narrowcast 及 Audience Management 功能的相關新聞:

Messaging API narrowcast 英文技術文件正式上線

介紹如何透過 Messaging API 發送 narrowcast 訊息、管理受眾的 (部分) 英文技術文件正式上線:

部份文件仍為日文,近期內將翻譯為英文:

欲查看上述 Messaging API 功能的相關新聞,請至:

受眾群體分享功能正式上線

現在,開發者可於 LINE Official Account Manager 和 LINE Ad,使用以 Messaging API 建立的受眾群體 (Audience)。

受眾群體協助更精準地將廣告訊息發送給真正感興趣的用戶,透過使用受眾群體,開發者可將訊息傳送給之前曾開啟訊息,或點擊訊息連結的用戶。

之前建立過的受眾群體,將自動顯示於 LINE Official Account Manager 和 LINE Ad 中,開發者不須更改任何設定。

如欲取得更多受眾群體相關訊息,請查看 Messaging API 技術文件中的 Using audiences

New Messaging API endpoint for sending narrowcast messages

An endpoint for sending narrowcast messages has been added to the Messaging API.

This endpoint lets you send push messages to multiple users at any time.

You can specify the recipient using certain attributes (gender, age, OS type, region etc) and retargeting (audience).

For more information, see Send messages to multiple users using attribute information and retargeting.

Documentation available in Japanese only. English coming soon.

[Updated] 請確認 provider 名稱正確

2020 年 1 月 9 日追加說明

本功能原訂於 2020 年 1 月 9 日上線,但因故改於 2020 年 1 月 16 日上線。

自 2020 年 1 月 16 日起,使用 Messaging API 的 LINE 官方帳號,將於用戶資料下方顯示開發者註冊的 provider 名稱。

企業 LINE 官方帳號亦可能將個人名稱註冊為 provider 名稱,請確認所註冊的名稱正確無誤。Provider 可於 LINE Developers Console 進行更改。

用戶資料

*Provider 名稱如紅框中所示

Messaging API webhook event 新增屬性 "mode"

Messaging API webhook event 新增屬性 mode

modechannel multiplexing 功能的必要屬性 (開發中)。目前,所有 webhook event 皆包含 "mode": "active"

mode 的值不會自動切換為 standby。若 channel 管理者開始使用 channel multiplexing 功能,可選擇將 mode 的值更改為 standby

如欲取得更多 mode 屬性相關訊息,請查看 Messaging API reference - webhook events 中的 Common properties 內容。

LINE Developers console - channel statistics 資料顯示問題 (已解決)

之前由於不同系統的時差設定有異,LINE Developers console 中 Messaging API channel Statistics 表單所顯示的部份日期,與 TSV 檔案中所顯示的不一致 (TSV 檔案可透過點選 Download as TSV 按鍵產生)。

當時此狀況僅影響日本標準時間 (JST) 以外時區的資料顯示,且不會刪除或損毀資料。

# 發生時間

2019/11/26~2019/12/18

目前,此問題已排除,開發者可重新取得正常顯示的資料。之前所造成的不便,敬請包涵!

Beacon event 新增 stay event

Messaging API beacon event 新增 stay event,可指出用戶目前位於 beacon 所涵蓋的範圍內。

如欲使用 stay event,歡迎與 LINE for Business 團隊聯繫。

Webhook event 新增屬性"貼圖訊息"

Webhook event 新增 stickerResourceType 屬性,開發者在收到貼圖訊息後,將可於訊息通知中取得此屬性。

開發者可透過此屬性,查看接收到的貼圖類型 (靜態貼圖、動態貼圖、動態有聲貼圖,或其他類型貼圖)。

如欲取得更多資訊,請至 Messaging API reference - Sticker 介紹。

Endpoint 網域名稱變更通知

部分 Messaging API endpoint 的網域名稱 (domain name) 由 api.line.me 變更為 api-data.line.me,本次變更不包含任何 maintenance。

# 變更網域名稱的 endpoint:

# 影響

使用以上 endpoint 的開發者,請於轉換期限前變更網域名稱。如造成任何不便,敬請見諒,感謝配合。

轉換期結束後,使用以上 endpoint 的舊網域名稱將會顯示 404 錯誤訊息。

# 轉換期間

即日起至 2020 年 4 月 30 日

Endpoint for obtaining user statistics now available in Thailand (TH)

Previously, the following Messaging API endpoint didn't allow LINE Official Accounts created in Thailand (TH) to get user activity statistics. Today, we've made it available.

This endpoint returns the same data as on the Insight tab in the LINE Official Account manager.

最新 Messaging API endpoint 提供互動數據資料

最新 Messaging API endpoint 正式上線,提供詳細數據資料,協助開發者了解用戶與 LINE 官方帳號 (OA) 發送的訊息進行哪些互動。

此 endpoint 提供的數據資料,與 LINE Official Account managerInsight 表單所顯示的數據資料相同。

Notice about service outage for the Messaging API (resolved)

We'd like to inform you about a service outage regarding the Messaging API. The issue has now been resolved. We apologize for any inconvenience that this may have caused.

# Date and time of outage

Date: October 4, 2019

Time:

9:00-9:02 JST (GMT+9)

10:04 JST (GMT+9)

11:00-11:08 JST (GMT+9)

12:02-12:08 JST (GMT+9)

# Cause

Issue with our servers.

# Affected services

All Messaging API endpoints (https://api.line.me/v2/bot/*).

# Details

The API returned status code 500 for some requests.

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

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.

Try out Messaging API calls in your browser

We've added a Try button to these sections of the Messaging API reference documentation:

Clicking Try reveals a form that enables you to test the API call right then and there. You'll need to enter some required information, such as your channel access token (found in the console). Depending on the call, there are also other fields to fill in.

For now, this feature is only enabled for a small number of operations. We plan to increase the number in future releases to cover more Messaging API functionality.

Notice about service outage for the Messaging API (resolved)

We'd like to inform you about a service outage regarding the Messaging API. The issue has now been resolved. We apologize for any inconvenience that this may have caused.

# Date and time of outage

Date: September 11, 2019 Time: 17:00–18:30 JST (GMT+9)

Date: September 12, 2019 Time: 13:00–13:30 JST (GMT+9)

# Cause

Server outage due to heavy load.

# Affected services

All Messaging API endpoints (https://api.line.me/v2/bot/*).

# Details

The API returned status code 500 for some requests. Also, the "Send reply message" endpoint (https://api.line.me/v2/bot/message/reply) returned error codes in the 400 range, even for correct requests.

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

Flex Message Simulator Update 1 (β) released

We released Flex Message Simulator Update 1 (β). This version contains sample Flex Messages with more sophisticated layouts based on the new features of Flex Message Update 1.

Limitations

We can't guarantee that the appearance of a Flex Message in Flex Message Simulator Update 1 (β) exactly matches the rendering on a target device. A single Flex Message may be rendered differently from device to device. Factors that affect rendering include OS, LINE version, screen resolution, language setting, and fonts.

Flex Message Simulator Update 1 (β)

Flex Message Update 1 examples

Flex Message Update 1 released

We've added new Flex Message properties. As a result, you can use the rich expressive power of HTML and CSS in Flex Messages. For details, see Sending Flex Messages.

Flex Message example

New Messaging API endpoints for friend statistics

We're happy to announce that we've added 3 new Messaging API endpoints that enable you to get detailed information about the friends of your LINE Official Account:

The data returned by these endpoints is the same data displayed on the Insight tab in the LINE Official Account Manager.

We encountered problems during the planned migration of accounts from the deprecated Developer Trial plan to the new free plan, which started on June 11, 2019. The problems have now been resolved. We sincerely apologize for the inconvenience this caused.

# Date and time of outage

From: June 11, 2019
Until: June 18, 2019 14:33 JST (GMT+9)

# Cause

In Japan and Thailand, accounts that were migrated from the old Developer Trial plan to the new free plan incorrectly retained their old limit on number of friends (50).

# Details

When a user tried to befriend an account that had reached the limit of 50 friends, this error was displayed:

Sorry, the account you are trying to add cannot accept any more friends.

We have now removed the limit on the number of friends.

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

Notice about service outage for the Messaging API (resolved)

We'd like to inform you about a service outage regarding the Messaging API. The issue has now been resolved. We apologize for any inconvenience that this may have caused.

# Date and time of outage

Date: June 14, 2019 Time: 10:35–12:19 JST (GMT+9)

# Cause

Issue with our servers.

# Affected services

All Messaging API endpoints (https://api.line.me/v2/bot/*).

# Details

The API returned status code 500 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 the Messaging API (resolved)

We'd like to inform you about a service outage regarding the LINE Developers site. The issue has now been resolved. We apologize for any inconvenience that this may have caused.

# Date and time of outage

Date: June 5, 2019 Time: 14:41–15:05 JST (GMT+9)

(Most errors were solved by 14:55.)

# Cause

Issue with our servers.

# Affected services

All Messaging API endpoints (https://api.line.me/v2/bot/*) and webhook.

# Details

The API returned status code 403 or 500 error for some requests. Also, webhook events were not successfully sent.

We will continue to improve the quality of our services. Thank you for your understanding.

Changes associated with the integration of LINE@ accounts into LINE Official Accounts

With the consolidation of LINE@ account plans into LINE official plans, we changed the functionality of the LINE Developers console and the Messaging API as follows:

# Changes in the LINE Developers console

# Type of created accounts

When you create a Messaging API channel in the LINE Developers console, a LINE Official Account is created instead of a LINE@ account.

For more information, see Migration of LINE@ accounts. Existing LINE@ accounts will be migrated to LINE Official Accounts sequentially.

# Privacy policy and terms of use

Now you can set your own privacy policy and terms of use for your app in your LINE Login and Messaging API channels.

In the future, we will add links to your privacy policy and terms of use for your app in the user consent screen of LINE Login or your LINE Official Account.

# Enhanced Messaging API features

Bots associated with new or migrated LINE Official Accounts can use the following features regardless of applied plans:

Bots associated with LINE@ accounts cannot use these features depending on applied plans.

For more information, see the Messaging API reference.

Migrating your LINE@ account under the Developer Trial plan

We will consolidate the LINE@ account plans into the new LINE Official Account plans.

From April 18, 2019, when you create a Messaging API channel in the LINE Developers console, a LINE Official Account will be created instead of a LINE@ account.

After mid-June, 2019, we will migrate the existing LINE@ accounts under the Developer Trial plan to LINE Official Accounts. The free plan will be applied to the migrated LINE Official Accounts.

Learn more from Migration of LINE Developer Trial plan on the LINE Engineering Blog.

Messaging API: You can configure the rich menu setting for multiple users at a time

We added endpoints for the following rich menu operations:

For more information on how to use the rich menu features, see the following pages.

Notice about service outage for Messaging API (resolved)

We'd like to inform you about a service outage regarding the Messaging API. The issue has now been resolved but we sincerely apologize for any inconvenience that this may have caused.

# Date and time of outage

  • Date: February 26, 2019
  • Time: Approximately 11:15-13:00 (GMT+9)

# Cause of the outage

Issue with our servers.

# Details

HTTP status code 500 was sometimes returned when the following API endpoints were accessed:

  • Get content API: https://api.line.me/v2/bot/message/{messageId}/content
  • Rich menu API: https://api.line.me/v2/bot/richmenu/*

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 the Messaging API (resolved)

We'd like to inform you about a service outage regarding the Messaging API. The issue has now been resolved but we sincerely apologize for any inconvenience that this may have caused.

# Date and time of outage

  • Date: February 20, 2019
  • Time: Approximately 18:45-19:02 and 19:10-19:26 (GMT+9)

# Cause of the outage

Issue with our servers.

# Details

The Messaging API experienced errors with error code 403 or 500 during the outage.

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

Console: We changed how to check the number of your bot's friends

We moved information related to the number of your bot's friends from the LINE Developers console to the LINE Official Account Manager. We removed this information from the "Number of friends" tab on the "Statistics" tab of the Messaging API channels.

To view the number of your bot's friends, click the Account Manager Official Site button in the "Number of friends" tab. LINE Official Account Manager or LINE@ Manager will open according to your account plan.

To use the LINE Official Account Manager, you need separate access permission. If you cannot access these tools, please contact the tool administrators of your organization.

We will remove the "Number of friends" tab from the LINE Developers console on March 26, 2019.

New endpoints added to Messaging API

We added new endpoints to the Messaging API. Use these endpoints to get the number of messages sent from your channel.

Learn more from these sections of the Messaging API reference:

Notice about service outage for the Messaging API (resolved)

We'd like to inform you about a service outage regarding the Messaging API. The issue has now been resolved but we sincerely apologize for any inconvenience that this may have caused.

# Date and time of outage

  • Date: January 12, 2019
  • Time: 16:59-18:30 (GMT+9)

# Cause of the outage

Issue with our servers.

# Details

The Messaging API experienced errors with status code 5xx for approximately one minute around 17:00 on January 12, 2019. Also, webhook events were not successfully sent until 18:30 on the same day.

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

Specification change for the Messaging API

# The image and icon

Now you can specify any aspect ratio of images and icons within a certain range.

For more information, see the updated reference documentation below.

# URI action

Now you can set different action URLs for PC users (LINE for macOS and Windows) and smartphone users (LINE for iOS and Android).

For more information, see URI action.

[Update] Change to the imagemap message

We decided not to make the specification change of the imagemap message that we announced on November 14, 2018, for compatibility. We apologize for any inconveniences caused and appreciate your understanding.

You can continue to send imagemap messages even if you set actions in the area that does not fit the width and height of the image specified by the baseSize property.

However, the layout of such imagemap messages might be broken on the user device. We recommend setting actions within the area that fits the width and height of the image specified by the baseSize property.

New webhook events are added for the Messaging API

We have added two webhook events: Member join event and member leave event.

For more information, see the following sections:

Change to the imagemap message is scheduled

We'd like to inform you that we will change the specification of the imagemap message.

After the specification change, if the method of setting actions in imagemap messages is incorrect as below, an error occurs and you cannot send imagemap messages.

The current specification: You can send imagemap messages even if actions are set in the area that does not fit the width and height of the image specified by the baseSize property.

In this case, the layout of the imagemap displayed on the user device might be broken.

The new specification: You cannot send imagemap messages because the API request fails if actions are set in the area that does not fit the width and height of the image specified by the baseSize property.

This specification change will be released on November 27th.

Correction to documentation

There were errors in the description of the new destination property added to webhook events released yesterday. We correct it as below:

【Incorrect】The destination property includes the MID of a bot that should reeive the webhook events. The property value is a string that matches the regular expression, "u[0-9a-f]{32}".

【Correct】The destination property includes the user ID of a bot that should reeive the webhook events. The property value is a string that matches the regular expression, "U[0-9a-f]{32}".

For more information, see Request body.

Specification change for the Messaging API

# You can play videos in imagemap messages

Now you can play videos in imagemap messages.

For more information, see Imagemap message.

Note that this change doesn't include the validation of action areas of imagemap messages announced on October 24. We will inform you once we decide on our schedule.

# New properties are added to webhook events

  • The body of webhook events now includes the user ID (destination) of a bot that should receive the webhook events. For more information, see Request body.
  • New information is available in message objects for image, video, and audio messages. For more information, see Image, Video, and Audio.

Correction on November 9, 2018 : MID -> user ID

# Flex Messages can now be multicast

Now you can send Flex Messages with the /v2/bot/message/multicast endpoint.

For the /v2/bot/message/multicast endpoint, see Send multicast message in the Messaging API reference.

Change to the imagemap message is scheduled

We'd like to inform you that we will change the specification of the imagemap message.

After the specification change, if the method of setting actions in imagemap messages is incorrect as below, an error occurs and you cannot send imagemap messages.

The current specification: You can send imagemap messages even if actions are set in the area that does not fit the width and height of the image specified by the baseSize property.

In this case, the layout of the imagemap displayed on the user device might be broken.

The new specification: You cannot send imagemap messages because the API request fails if actions are set in the area that does not fit the width and height of the image specified by the baseSize property.

This specification change will be released in the week starting November 5th.

The scheme of the picture URL returned when getting a user profile has been changed

Now we support https as the scheme of the pictureUrl property. The response to the GET https://api.line.me/v2/bot/profile/{userId} request includes this property.

[Update] Discontinuation of the long-lived channel access token

We'd like to inform you of the change in the discontinuation of the long-lived channel access token that we announced in August.

We have concluded that discontinuing the long-lived channel access token by November can cause difficulty to many developers. Therefore, we will continue to support the long-lived channel access token and find alternative ways in the future that will not affect our developers.

Default rich menu can now be configured with the Messaging API

Now you can configure the default rich menu with the Messaging API.

Both default rich menus created using LINE@ Manager and the Messaging API are supported and can be used at the same time.

For more information on how to use the rich menu features, see the following pages.

More stickers are available for your bot

We have increased the number of sticker types available for bots from 342 to 462. You can create a smarter, more expressive bot with various new stickers.

For more information, see Sticker message and the sticker list.

Long-term channel access token to be discontinued

We'd like to inform you that we will discontinue the long-lived channel access token used with the Messaging API.

The discontinuation is scheduled in November 2018 with the removal of the endpoints of the Messaging API v1.

Note that the long-lived channel access token is issued only from the console. The following endpoint to issue a short-lived channel access token will not be affected.

https://api.line.me/v2/oauth/accessToken

We will provide further details for a replacement method soon.

Flex Message is now available on your desktop

Flex Message is now available on your desktop.

The feature is supported on LINE 5.9.0 for macOS and Windows.

In addition, we have added the following new Flex Message properties so that you can create messages in a more flexible way.

  • action property of the box
  • maxLines property of the text

For more information, see the following pages:

Quick reply released

We have released the quick reply feature for messages sent through the Messaging API. When a user receives a message that contains quick reply buttons, those buttons appear at the bottom of the chat screen. The user can simply tap one of the buttons to reply to your bot.

Quick reply sample

The quick reply feature is supported on LINE 8.11.0 and later for iOS and Android.

For more information, see Using quick replies.

An important message for our users in Thailand, Taiwan, and Indonesia

Important notice concerning LINE Official Accounts, LINE@ accounts, Business Connect accounts, and Customer Connect accounts The following message applies to our users in Thailand, Taiwan, and Indonesia. LINE Corporation will be collecting information from LINE Official Accounts, LINE@ accounts, Business Connect accounts, and Customer Connect accounts (OAs) in order to improve our services. You must agree to these terms by September 2, 2018.

Log in to LINE@ Manager

With these revised terms, we will work on improving services requested by OA users, such as visualization of delivery performance through message views, click counts, video views, etc. and targeting delivery based on user response logs to messages.

Notice about service outage for the Messaging API (resolved)

We'd like to inform you about a service outage regarding the Messaging API. The issue has now been resolved but we sincerely apologize for any inconvenience that this may have caused.

# Date of recovery

Date: June 27, 2018 JST (GMT+9)

# Cause of the outage

Issue with our servers.

# Details

When the Messaging API was called to unlink a rich menu from a user that was not in a chat with the bot, the rich menu was not unlinked from the user. This issue occured only to users with LINE 8.7.0 or later for iOS and rich menus configured at admin-official.line.me.

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

Flex Message released

We have released Flex Message, a new message type for the Messaging API. Flex Messages are messages with a customizable layout. You can customize the layout freely by combining multiple elements.

Flex Message samples

Flex Messages are only supported on LINE 6.7.0 and later for iOS and Android.

For more information, see Sending Flex Messages.

The maximum number of rich menus has been increased

Now you can set up to 1000 rich menus for one bot with the Messaging API. The previous maximum number was was 10.

For more information about rich menus, see Using rich menus.

Account link feature released

You will now be able to securely link the user account for your existing service with the LINE account of the user if they have friended your bot. This will allow you to utilize the user information you already have and use LINE bots to provide even better services.

For more information, see Linking user accounts. We will let you know when English documents become available.

LINE Bot Designer released

LINE Bot Designer lets you prototype LINE bots faster and easier without any programming knowledge. You can freely design chatbots in a desired scenario.

LINE Bot Designer free for use. Download it now. Anyone with a LINE account can use it.

For more information, see the LINE Bot Designer page.

Property for accessibility released

Now you can specify text to be spoken using the label property for imagemap messages and rich menus when the accessibility feature is enabled on the client device. This feature is supported on LINE 8.2.0 and later for iOS.

For more information, see the updated reference documentation below.

New properties for template messages and postback actions released

# Default actions can now be set for template messages

The defaultAction property has been added to the column object for buttons and carousel template messages. As a result, you can indicate a single action to be executed when a user taps anywhere in the image, title, or text area.

For more information, see the updated reference documentation below.

# displayText property for postback actions released

We have released the displayText property and have deprecated the text property for postback actions. We recommend using displayText instead of the text property. Note that the dislayText and text properties cannot both be used at the same time.

For more information, see the Postback action reference documentation.

Community SDK section released

We have released a community SDK section to our Messaging API SDKs page with Messaging API SDKs developed by our developer community. We currently have a C# (.NET) SDK and are looking to add more resources.

If you have developed a SDK or library for the Messaging API, see our Community contribution guidelines for information on how to submit your project to us for review.

New article on sharing bots

We've added a new article on how you can gain more friends and expand the reach of your bot. For example, you can use a QR code, add an "Add friend" button, or link your bot with a LINE Login channel.

Check out the article at Sharing your bot with users.

New options for template message images

We have released imageAspectRatio, imageSize, and imageBackgroundColor fields for Buttons and Carousel template messages. Using these fields, you can configure the aspect ratio, size, and background color for images used in template messages. For more information, see the reference documentation below.

LINE URL scheme information released

We've added an article about the LINE URL scheme to our LINE Login and Messaging API documentation. You can use the URL schemes to help your users navigate to specific content such as the camera, location, or settings screens in LINE. The LINE URL scheme can be used in your bot (Messaging API) from within LINE or in your native or web apps to automatically open LINE.

See the new articles below.

Link your bot to your LINE Login channel

We've added an option to display a prompt to let you display an option for users to add your bot as a friend when logging in to your app with LINE Login. To do this, first, link a bot to your LINE Login account from the new "Bot linked to this channel" item in the LINE Developers console, then include the bot_prompt query parameter in the authorization URL for LINE Login.

For more information on this feature, see Linking a bot with your LINE Login channel.

In addition, we've released a new resource for the Social API which lets you get the friendship status between your bot and a user. Send a GET request to https://api.line.me/friendship/v1/status to see if the user has added your bot as a friend or not.

To see the API reference for this resource, go to Get friendship status.

Note: This feature is not currently available to enterprise users. If you are an enterprise user and would like to use this feature, please contact your LINE representative.

LINE Login and Messaging API glossaries

To help you better understand the terms and concepts used in our documentation, we've added glossaries for both LINE Login and Messaging API.

Check them out using the links below.

Specification change for rich menu resources

We've made changes to the response of the rich menu resources of the Messaging API listed below. When sending a request to delete or upload a rich menu or to link or unlink a rich menu for a user, the LINE Platform will now return a 200 status code and an empty JSON object on success instead of returning only a 200 status code.

See the updated API reference documentation below.

Column objects for template messages increased

We've increased the number of column objects that you can include in your carousel and image carousel template messages from 5 to 10 objects.

For more information, see the updated reference documentation below.

Rich menu features for Messaging API released

We've released rich menu features for the Messaging API which lets you display different rich menus to different users. By using the newly released rich menu endpoints, you can create, link, and manage your rich menus programmatically via the API instead of using LINE@ Manager. The rich menu endpoints provide greater freedom in designing rich menus and the ability to set postback actions to specified areas.

In addition to the current rich menu size of 2500x1686 on LINE@ Manager, you can now create smaller rich menus that are 2500x843 with the Messaging API. This smaller rich menu size lets you display more of the chat screen while still providing an interactive menu for the user.

Both rich menus created using LINE@ Manager and the Messaging API are supported and can be used at the same time.

Note: These rich menu features are only supported on LINE 7.14.0 and later for Android and iOS.

For more information on how to use the new rich menu features, see the following pages.

Changes to the user consent process and data retrieved in webhooks

The user consent process and the data included in certain webhooks will change from LINE version 7.5.0 (iOS and Android). The details of the changes are shown below.

  1. Changes to the user consent process

    The way that users give consent to bots (LINE@ accounts and LINE Official Accounts) will change with the release of LINE version 7.5.0. Instead of requiring users to agree to a consent screen for every bot they want to add as a friend or start a chat with, from version 7.5.0, users will provide consent to all bots at once through a new consent screen (called the “Official Accounts Terms of Use”). After users have agreed to this screen once, they will be able to add other bots as friends and add them to chats in a single action.

    For more information on the user consent process, see User consent

  2. Changes to the Messaging API specifications

    Webhooks will include the user ID of users who send messages in a group or a room if the user has agreed to the “Official Accounts Terms of Use”. Note that the user ID will not be included in the webhook if the user is using a version of LINE below 7.5.0.

Messaging API SDK for Node.js released

We have released the Messaging API SDK for Node.js. This makes it easier for you to to build a bot on LINE with Node.js using the Messaging API.

See the Messaging API SDK repository below.

For more information on how to use the Messaging API SDK for Node.js, see the documentation.

Multicast feature released

We've released the multicast feature which lets you send messages to multiple users at any time.

See the updated documentation in the API reference below.

We will continue to provide improvements so that developers can code more easily.

Messaging API released and LINE Developers documentation updated

We've made some updates to the LINE Developers website. We've added new documentation together with the release of the Messaging API. Our API reference documentation has also been updated and redesigned. And we've made a couple of branding changes as well.

For more detailed information about the changes, see below:

  • Added "Overview", "Getting started", and API reference documentation for the Messaging API. For more information, see Messaging API.
  • Changed the look of the API reference documentation. See the new documentation here: API reference.
  • Made the following branding changes:
    • Web API includes the APIs used for integrating Web Login with your websites.
    • Social REST API includes REST APIs that you can call from your applications.
    • LINE Login, LINE SDK for Android, LINE SDK for iOS, Web API, and Social REST API are included in Social API
  • Added information on LINE Official Accounts and LINE@ accounts in "Account types".

Sending rich messages section updated

The "Sending rich messages" section of the LINE Developers site has been updated to include information about the "sendMessage" feature of rich messages.

For more information, go to https://developers.line.me/bot-api/api-reference.

Useful links have been added for BOT API Trial

We have added useful links to accelerate your development on BOT API Trial.

See all the links added from below.

Messaging API links

List of stickers updated

Sticker images have been added to the sticker list which will allow developers to easily recognize the sticker ID.

Method for calling APIs for BOT API Trial changed

You are no longer required to register the IP address of your server to call APIs for BOT API Trial. If you register an IP address on the whitelist, API calls will be limited to that IP address. You can use the whitelist for security purposes.

Let's Encrypt and StartSSL CA has been added

SSL CA root certificates for Let's Encrypt and StartSSL have been added for BOT API callback URL.

See the "Note" in the Registering a callback URL section to find a link to the full list of authorized CAs.