Messaging API

Use the Messaging API to build bots that provide personalized experiences for your users on LINE.

You associate your bot with a channel on the LINE Platform. The bot works behind the LINE official account that is generated when you create the channel if you operate the account in bot mode.

Note: As of April 18, 2019, the existing LINE@ account plans have been consolidated into the new LINE official account plans. This LINE Developers documentation mainly describes features available to LINE official accounts. For more information about migrating LINE@ accounts to LINE official accounts, see Migration of LINE@ accounts.

How it works

The Messaging API allows for data to be passed between your bot server and the LINE Platform. Requests are sent over HTTPS in JSON format.

  1. The user sends a message to the LINE official account.
  2. The LINE Platform sends a webhook event to the webhook URL of the bot server.
  3. According to the webhook event, the bot server responds to the user through the LINE Platform.

Messaging API architecture

What you can do with the Messaging API

Send reply messages

Reply with a message to users who interacts with your LINE official account. Requires a reply token in the request. For more information, see Message categories.

Send push messages

Send messages directly to users whenever you want. For more information, see Message categories.

Send various message types

Choose from various types of messages to send to users including:

For more information, see Message types.

Get user profiles

Get LINE user profile information of users who interact with your LINE official account in one-on-one and group chats. You can get users' display names, profile images and status messages.

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

Join group chats

Send messages in group chats and get information about the members of the group. For more information, see Group chats.

Use rich menus

The rich menu is a customizable menu which helps users discover how they can interact with your LINE official account. Users can access this menu from the chat at any time.

For more information, see Using rich menus.

Use beacons

Using LINE Beacon, you can configure your LINE official account to interact with users whenever they enter the range of a beacon. For more information on using beacons, see Using beacons.

By using the account link feature, providers (businesses and developers) can securely link the existing user accounts from their service with accounts belonging to LINE users that have friended providers' LINE official account. For more information, see Linking user accounts.

Get the number of sent messages

This only returns the number of messages sent with the Messaging API, not LINE Official Account Manager.

For more information, see the following sections in the Messaging API reference.

Next steps

To create a bot, create a Messaging API channel in the LINE Developers console. A LINE official account is created together with the channel.

For more information, see Getting started with the Messaging API.

{{ $t("form.question.helpful") }}

{{ $t("form.question.detail") }}

{{ $t("form.question.improve") }}

{{ $t("form.info.start") }}{{ $t("form.info.link") }}{{ $t("form.info.end") }}


{{ $t("form.result.success") }}
{{ $t("form.result.error") }}
{{ $t("form.result.errorLink") }}