# LINE

## Connect with LINE

Connect the Scope with LINE to activate your conversational AI in LINE messages. For more information on the LINE Messenger API, see the [guide](https://developers.line.biz/en/docs/messaging-api/getting-started/) from LINE.

### Before you begin

* You need to have a LINE account and to be registered in [LINE Developers](https://developers.line.biz/console/).

### Integrate Scope with Line

1. If you are new to LINE Developers Console, create a new provider. Click **Create a new provider**.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FcKRDfickvzWpCj6bIvkT%2Fimage.png?alt=media\&token=5ced12ea-a9be-4b83-a69a-f7e4d031c55b)

2\. Enter a provider name and click Create.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FGu4TGY50ZVzjXsaVNa2T%2Fimage.png?alt=media\&token=984f4727-cd85-49dc-aae3-9836623520fa)

3\. On the provider page, click Create a Messaging API channel in the Channels tab.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FkBuK3kVEnZykRvO1VBM1%2Fimage.png?alt=media\&token=a941494a-6f21-40a4-9b4a-d4e15e62cfe9)

4\. To create a new channel, complete the form and click Create.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FC5n3GKzwFJBHmBONb2pK%2Fimage.png?alt=media\&token=fa01234e-192b-433f-ac8d-cceb3990b2bf)

5\. Confirm the information and click **OK**.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FS2nNimzwTzcmCZ4EdRpl%2Fimage.png?alt=media\&token=34603580-193c-404a-b463-5a1418433a26)

6\. Once the channel is created, you will be directed to the channel settings page.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FrisIIrXNrk1JOgW5JPlE%2Fimage.png?alt=media\&token=4b9c4d53-625d-4979-9fa4-7abb0bf28b38)

7\. Scroll down to find Channel secret field and copy the channel secret key.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2Fpe32LQFhQIA0rVRoCZzj%2Fimage.png?alt=media\&token=0f8b479f-9351-49ff-a2c4-ce81723d8bed)

8\. Click **Integration** on the Scope details page of Mind Expression.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FGtP0Nq8uwl3zW9Upp3xy%2Fimage.png?alt=media\&token=7db3492a-2f96-45fb-8006-0254610a9f2a)

9\. Click **Connect** under LINE.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FqsGEygZqdLlSIUaWiMKU%2Fimage.png?alt=media\&token=e1904533-98b1-4c6e-9bda-7ab3e0a08113)

10\. Paste the channel secret in the Channel Secret text field.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FGRaeoq0dt5pBuJt7w8nY%2Fimage.png?alt=media\&token=399ebeab-e216-4590-908d-692d4d9b0fa6)

11\. Come back to LINE Developers and click **Messaging API** tab.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2F5Mai0aWlpbXU2cLFaQCZ%2Fimage.png?alt=media\&token=7ea0166b-4ead-4c80-ada4-4d346463515b)

12\. Find Channel access token and click **Issue**.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2Fn3Z9M8yG9yHg4ZtCQL9p%2Fimage.png?alt=media\&token=3dc0eecf-8465-4598-b377-d66dd33dd236)

13\. Copy the issued channel access token.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FHJEWy0IJtOOdpCahc71U%2Fimage.png?alt=media\&token=a7100221-fcff-4af6-bf99-fbf7e78cd81b)

14\. Paste the channel access token in the Channel Access Token text field.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FAinODBVHlsapCAUUCKtM%2Fimage.png?alt=media\&token=9654b640-0ebb-4db3-847f-f4405a54ffa4)

15\. Copy Webhook URL and click **Connect**.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FZ9890huM7QDdbfPbKee0%2Fimage.png?alt=media\&token=36359a75-ca71-4bf6-ae48-ff781fedd318)

16\. Come back to Line Developers and find Webhook URL under Webhook Settings. Click **Edit**.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FGDZmYm3uBVkE111KUZs7%2Fimage.png?alt=media\&token=3f115c30-45a8-4f7d-9122-421f34f4058c)

17\. Paste the Webhook URL in the Webhook URL text field. Then, click **Update**.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FOS5lzQAZdDYQQGlIR2Ep%2Fimage.png?alt=media\&token=f447c094-a629-427d-94ef-3d93f0387c01)

18\. Click **Verify** and see if the validation was successful, then click **OK**.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FtXQaHLPFbvXQg8mjrgL9%2Fimage.png?alt=media\&token=655e5876-8701-45d6-bd29-710ed63d1210)

19\. Turn on the **Use webhook** toggle.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2Fvnk1DOtaV75tO3LqiWD2%2Fimage.png?alt=media\&token=b5715b05-508e-4a43-abe5-a64c61dbdf4d)

20\. Find LINE Official Account features and click **Edit** for Auto-reply messages.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FfpvoGJ95ZvNQboiNo9EV%2Fimage.png?alt=media\&token=b6a77486-bfb0-496f-8762-b171a2183302)

21\. In Response settings, find Detailed settings. Click **Disabled** for Auto-response and click Enabled for Webhooks.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2F6IoCRyR5Z9BAite3It78%2Fimage.png?alt=media\&token=ced75c28-ef29-48ab-bb20-faaf38447f60)

### Test and release Scope to public with LINE

LINE doesn’t require further permissions to launch the LINE app to public. Your LINE app is immediately accessible to others.

1. Open your LINE app, and click on Add Friend button at the right corner.\
   ![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FzPacAGoYUSt2sdI4EYJW%2Fimage.png?alt=media\&token=a5e89f71-f155-4e47-b4f4-a99a390fc063)
2. Click **QR** code to add the bot as a friend.\
   ![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2F1jB5YHiEugJdktVsh6Xw%2Fimage.png?alt=media\&token=03a9931e-2058-4449-82fe-a2a2f1461abf)
3. Scan the QR code for the LINE bot on the Messaging API page. Once the bot profile appears in the mobile app, click **Add**. You can start a conversation by clicking **Chat** after adding the bot as a friend.\\

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2F1yepYMrRMVmtRXACOMRs%2Fimage.png?alt=media\&token=651a7983-30fd-4e0f-b906-e51ca7f97436)

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FQanbmcTTomnRt3Vhtpqe%2Fimage.png?alt=media\&token=eddee290-49db-41c6-b150-73e593330845)

4\. Send messages to the bot.

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2F4H0hr9H1AaA78CBFvIbM%2Fimage.png?alt=media\&token=bd8f7d80-0dc4-49fe-b4ab-b22a5686b5ba)

5\. You can audit the test conversations on the Conversation History page of the Scope. Test conversations with integration are listed on the Live tab.

### Custom UI

Allows you to customize your messages' appearance according to your desired theme.

1. Go to your **Scope** and click **Custom UI.**

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2Fl6ulMcmIT2U1L6ROn5h4%2FScreen%20Shot%202022-05-20%20at%201.04.41%20PM.png?alt=media\&token=e3860bd5-1b50-425a-ac7f-62814a10a8af)

2\. Upon visiting the Custom UI, it allows you to modify the color of the following items:

* Card Background
* Card Title
* Card Subtitle
* Card Button Background

![](https://2637928320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiRqPwZJVepiA6JYXHnaO%2Fuploads%2FopHakCWy8ezPaB39URr3%2FScreen%20Shot%202022-05-20%20at%2012.59.14%20PM.png?alt=media\&token=df9cd5a8-5fd7-439c-9909-3310bb8ec3ec)
