# Module

Procedures are required to use optional functions

The functions described in this document are available only to corporate customers who have made the prescribed applications. If you would like to publish the extension function using the module, contact the sales representative or contact us from LINE Marketplace Inquiry (opens new window) (only available in Japanese).

# Overview

The module is a mechanism that allows you to add functions using the Messaging API to your LINE Official Account by linking (attaching) it to your LINE Official Account. Modules are provided as a type of channel module channel. Even if your LINE Official Account hasn't created a Messaging API channel, you can still call the Messaging API from the module channel to send messages to users and set rich menus.

Relationship between module channel and LINE Official Account

Normally, you can only create (open) one Messaging API channel for one LINE Official Account. Module channels are a new type of channel that can be linked to multiple LINE Official Accounts.

module channel

# Module usage example

For example, let's say you have a LINE Official Account that uses the chat function of the LINE Official Account Manager to communicate with users. If a "module channel with in-store reservation function" is linked to this LINE Official Account, you can chat with users on the LINE Official Account Manager and automate the in-store reservation process through the module.

Webhooks are enabled for module channels

If the response setting of the LINE Official Account is Chat (opens new window) (only available in Japanese) or webhook use is disabled, webhook events won't be sent to the Messaging API channel. Webhook events are still sent to the module channel under these settings.

Depending on the content of the webhook event you get, the module channel can be implemented to send a message to the user.

Sample

Number Description
1 The user sends a message
2 The operator sends a message to the user using the chat function of LINE Official Account Manager
3 The user presses the rich menu to execute the module with the function to make a reservation
4 The bot for the reservation function responds and the reservation process begins

# Documentation

See Module reference (opens new window) (PDF file) for technical specs such as the REST API provided by the module.

# Prepare the necessary systems and mechanisms

Note

Currently, the module is only available for release as a paid extension on the LINE Marketplace (opens new window) (only available in Japanese).

The functions provided by LINE in the module are as follows.

Function name Description
Mechanism for linking module channels to LINE Official Accounts It provides a mechanism for OAuth 2.0 authorization and a mechanism for linking module channels to LINE Official Accounts using the REST API. For more information, see "Attach module channels using the OAuth 2.0 authorization mechanism" in Documentation.
API to unlink the LINE Official Account from the module channel A REST API is provided to unlink the LINE Official Account from the module channel. For more information, see "Unlink (detach) the module channel by the operation of the module channel administrator" in Documentation.
API to control channel initiative Module channels have a concept called channel initiative (Chat Control). You can send a reply message to a user, group, or chat room from the channel with the initiative.
Normally, the modular channels offered on the LINE Marketplace don't require initiative control, but we provide a REST API to control channel initiative to handle cases where channel initiative is changed due to unexpected events.
For more information, see "Control channel initiative (Chat Control)" in Documentation.
Mechanism to use the Messaging API from the module channel When calling the Messaging API from a module channel, you need to specify a special request header specifically for the module. For more information, see "Using the Messaging API from the module channel" in Documentation.
Webhook events dedicated to the module channel The module channel provides dedicated webhook events. For more information, see "Receive module channel-specific Webhook events" in Documentation.
API to get information of a LINE Official Account linked to a module channel Provides a REST API to get information about a LINE Official Account linked to a module channel. For more information, see "Get the LINE Official Account information from the module channel" in Documentation.

Other than the above, all other systems (servers, etc.) and mechanisms required to publish extensions on the LINE Marketplace must be provided (developed) by the customer. For example:

# Mechanisms for using the functions provided by the module

The module channel is used in conjunction with the LINE Official Account based on the OAuth 2.0 authorization code granting flow (opens new window). Customers are required to prepare various mechanisms to use the functions described in Prepare the necessary systems and mechanisms, including the system required to grant OAuth 2.0 authorization codes (authorization requests).

# Mechanism for using the Messaging API from the module channel

To use the Messaging API from a module channel linked to your LINE Official Account, you need to request the Messaging API with a special request header specifically for the module channel. Customers are required to prepare the mechanism for requesting the Messaging API and the mechanism for extended functions (chatbots, etc.) provided by the module.

Additional costs may be required for message delivery

When calling the Messaging API from the module channel to send messages to users, the operator of the LINE Official Account linked to the module channel may be required to pay the Messaging API fee. This is the same as when a message is sent from a Messaging API channel using the Messaging API.

# Mechanism of management screen and operation console required for users to use extended functions

Customers are required to provide their own management screens, operation consoles, and other mechanisms necessary for users to use the extended functions implemented in the module.

# Mechanism for payment and management of module usage fees

The module will be available as a paid extension on the LINE Marketplace (opens new window) (only available in Japanese). Customers are required to provide their own mechanisms for managing users who use the extensions and for settling usage fees.

# Support mechanism for users

Customers are required to prepare a support mechanism for users who use the module extensions. LINE Corporation doesn't provide support to users of extensions published on the LINE Marketplace (opens new window) (only available in Japanese).

# Note

You must comply with these items when using the module channel function in the LINE Marketplace:

# Messaging API calls from Messaging API channel (combined)

We don't recommend using the Messaging API from the Messaging API channel for LINE Official Accounts that are linked to the module channel. This is because, depending on the system implementation, unexpected behavior may occur in the extended functions provided by the module.

For example, these problems may occur:

# Max number of module channels that can be linked

In the LINE Marketplace, only one module channel (extension) can be linked to one LINE Official Account at the same time.

# Types of Messaging APIs available for module channel

The type of Messaging API available for the module channel depends on the permissions (scope) granted when the module channel is linked. For more information, see "scope" in "1. Request authorization from the LINE Official Account admin" in Documentation.

# Get webhook event

In the module channel, you can set one endpoint URL to get webhook events.

When a module channel is linked to a LINE Official Account, webhook events corresponding to the content sent to the LINE Official Account's chat room are also sent to the endpoints set up in the module channel. For more information on webhook events in module channels, see "Receiving a webhook" in Documentation.

Webhook events dedicated to module channels

There are webhook events that are sent only to the module channel. For more information, see "Receive module channel-specific Webhook events" in Documentation.

About webhook events in Messaging API channels

If the LINE Official Account linked to the module channel is using the Messaging API channel and webhook use is enabled, webhook events will be sent to both the module channel and the endpoint URL set for the Messaging API channel. In this case, the webhook event sent to the Messaging API channel endpoint URL will have the mode property set to standby and the webhook event won't contain a reply token to send reply message.