{"__v":0,"_id":"5845a4a99f6fbb1b00430806","category":{"version":"5845a4a89f6fbb1b004307b7","project":"54d3007669578e0d002730c9","_id":"5845a4a89f6fbb1b004307bd","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-08T18:48:02.369Z","from_sync":false,"order":5,"slug":"integrations","title":"Integrations"},"parentDoc":null,"project":"54d3007669578e0d002730c9","user":"55bf6cdcad601c2b00762d13","version":{"__v":1,"_id":"5845a4a89f6fbb1b004307b7","project":"54d3007669578e0d002730c9","createdAt":"2016-12-05T17:32:24.708Z","releaseDate":"2016-12-05T17:32:24.708Z","categories":["5845a4a89f6fbb1b004307b8","5845a4a89f6fbb1b004307b9","5845a4a89f6fbb1b004307ba","5845a4a89f6fbb1b004307bb","5845a4a89f6fbb1b004307bc","5845a4a89f6fbb1b004307bd","5845a4a89f6fbb1b004307be","5845a4a89f6fbb1b004307bf","5845a4a89f6fbb1b004307c0"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"25.0.0","version":"25"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-22T23:40:46.959Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":11,"body":"* [Overview](#overview)\n* [LINE Bot Setup](#line-bot-setup)\n* [Integrating API.AI Agent with LINE Bot](#integrating-apiai-agent-with-line-bot)\n* [Test Your Bot](#test-your-bot)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Overview\"\n}\n[/block]\n**API.AI LINE Integration** allows you to easily create LINE bots with natural language understanding based on the API.AI technology.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"LINE Bot Setup\"\n}\n[/block]\nIn your mobile LINE version, go to Settings > Account > Email Account Registration and register an email account.\n\nOn your computer, log in to the LINE business center with your email and password that you registered in the mobile version of LINE and register a new company.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/e6Zm0MUnQw2rXzplmYtX_LINE_Business_Center_new_company.png\",\n        \"LINE_Business_Center_new_company.png\",\n        \"2270\",\n        \"544\",\n        \"#3c74fb\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nWhen your new company registration has been completed, click on the company name and select BOT API Trial account.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/KWAqrZV5QGSvqYRDa6bB_LINE_Business_Center_select_BOT_API_Trial_Account.png\",\n        \"LINE_Business_Center_select_BOT_API_Trial_Account.png\",\n        \"2256\",\n        \"1496\",\n        \"#f64e46\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nScroll down to the bottom of the page and click on the Start button. \n\nProvide an account name and click on Submit.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/J8MMJgV5TkyXfhs7RN58_LINE_Business_Center_Create_Business_account.png\",\n        \"LINE_Business_Center_Create_Business_account.png\",\n        \"2270\",\n        \"1490\",\n        \"#f05048\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nConfirm your BOT API Trial account creation by clicking on Create button.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/NMPLMQFdQ3aEjcvPaJSH_LINE_developers_create_business_account.png\",\n        \"LINE_developers_create_business_account.png\",\n        \"2474\",\n        \"1578\",\n        \"#3dc208\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nOn the page that will open, you’ll see Channel ID, Channel Secret, and MID.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/NeA4lKXTrqaHtUxGU9y7_LINE_developers_Copy_details.png\",\n        \"LINE_developers_Copy_details.png\",\n        \"2802\",\n        \"1316\",\n        \"#3bc304\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Integrating API.AI Agent with LINE Bot\"\n}\n[/block]\nIn your API.AI developer console, click on Integration in the left side menu and enable LINE integration. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ZcKkWS3qQDid7W7KOEB1_LINE_enable_integration.png\",\n        \"LINE_enable_integration.png\",\n        \"2136\",\n        \"1384\",\n        \"#2d9cdf\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nCopy Channel ID, Channel Secret, and MID from the LINE bot settings page and paste to the respective fields in the API.AI LINE integration settings. Then, click Start.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/CRVLjYNdS6eBunOqFZIg_LINE_Api-ai_settings.png\",\n        \"LINE_Api-ai_settings.png\",\n        \"2282\",\n        \"1396\",\n        \"#fb4e45\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nCopy the Callback URL from the API.AI LINE integration settings. Go back to the LINE page, scroll down to the bottom of the page, and click the Edit button. Paste the Callback URL to the respective field and click Save. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/PvL2PAxCTIqpKr3KSDr5_LINE_Callback_URL.png\",\n        \"LINE_Callback_URL.png\",\n        \"2538\",\n        \"1374\",\n        \"#54a4e4\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Test Your Bot\"\n}\n[/block]\nOn your mobile device, go to More from the main menu (three horizontal dots), select QR Code, and scan the code from your LINE bot settings page.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/SLHQn7W4TTKbPK8vkQ9o_LINE_QR_code_mobile.png\",\n        \"LINE_QR_code_mobile.png\",\n        \"1440\",\n        \"2560\",\n        \"#e5473b\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nYour bot will appear in Chats:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/aUMb2OKQn24YvZ9lOxag_LINE_bot_chat.png\",\n        \"LINE_bot_chat.png\",\n        \"1440\",\n        \"2560\",\n        \"#09c109\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nChat with it:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/aOeD6myxSgCvFqTf0ar2_LINE_bot_chatting.png\",\n        \"LINE_bot_chatting.png\",\n        \"1440\",\n        \"2560\",\n        \"#dedee5\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"line-integration","type":"basic","title":"LINE Integration"}
* [Overview](#overview) * [LINE Bot Setup](#line-bot-setup) * [Integrating API.AI Agent with LINE Bot](#integrating-apiai-agent-with-line-bot) * [Test Your Bot](#test-your-bot) [block:api-header] { "type": "basic", "title": "Overview" } [/block] **API.AI LINE Integration** allows you to easily create LINE bots with natural language understanding based on the API.AI technology. [block:api-header] { "type": "basic", "title": "LINE Bot Setup" } [/block] In your mobile LINE version, go to Settings > Account > Email Account Registration and register an email account. On your computer, log in to the LINE business center with your email and password that you registered in the mobile version of LINE and register a new company. [block:image] { "images": [ { "image": [ "https://files.readme.io/e6Zm0MUnQw2rXzplmYtX_LINE_Business_Center_new_company.png", "LINE_Business_Center_new_company.png", "2270", "544", "#3c74fb", "" ], "sizing": "full" } ] } [/block] When your new company registration has been completed, click on the company name and select BOT API Trial account. [block:image] { "images": [ { "image": [ "https://files.readme.io/KWAqrZV5QGSvqYRDa6bB_LINE_Business_Center_select_BOT_API_Trial_Account.png", "LINE_Business_Center_select_BOT_API_Trial_Account.png", "2256", "1496", "#f64e46", "" ], "sizing": "full" } ] } [/block] Scroll down to the bottom of the page and click on the Start button. Provide an account name and click on Submit. [block:image] { "images": [ { "image": [ "https://files.readme.io/J8MMJgV5TkyXfhs7RN58_LINE_Business_Center_Create_Business_account.png", "LINE_Business_Center_Create_Business_account.png", "2270", "1490", "#f05048", "" ], "sizing": "full" } ] } [/block] Confirm your BOT API Trial account creation by clicking on Create button. [block:image] { "images": [ { "image": [ "https://files.readme.io/NMPLMQFdQ3aEjcvPaJSH_LINE_developers_create_business_account.png", "LINE_developers_create_business_account.png", "2474", "1578", "#3dc208", "" ], "sizing": "full" } ] } [/block] On the page that will open, you’ll see Channel ID, Channel Secret, and MID. [block:image] { "images": [ { "image": [ "https://files.readme.io/NeA4lKXTrqaHtUxGU9y7_LINE_developers_Copy_details.png", "LINE_developers_Copy_details.png", "2802", "1316", "#3bc304", "" ], "sizing": "full" } ] } [/block] [block:api-header] { "type": "basic", "title": "Integrating API.AI Agent with LINE Bot" } [/block] In your API.AI developer console, click on Integration in the left side menu and enable LINE integration. [block:image] { "images": [ { "image": [ "https://files.readme.io/ZcKkWS3qQDid7W7KOEB1_LINE_enable_integration.png", "LINE_enable_integration.png", "2136", "1384", "#2d9cdf", "" ], "sizing": "full" } ] } [/block] Copy Channel ID, Channel Secret, and MID from the LINE bot settings page and paste to the respective fields in the API.AI LINE integration settings. Then, click Start. [block:image] { "images": [ { "image": [ "https://files.readme.io/CRVLjYNdS6eBunOqFZIg_LINE_Api-ai_settings.png", "LINE_Api-ai_settings.png", "2282", "1396", "#fb4e45", "" ], "sizing": "full" } ] } [/block] Copy the Callback URL from the API.AI LINE integration settings. Go back to the LINE page, scroll down to the bottom of the page, and click the Edit button. Paste the Callback URL to the respective field and click Save. [block:image] { "images": [ { "image": [ "https://files.readme.io/PvL2PAxCTIqpKr3KSDr5_LINE_Callback_URL.png", "LINE_Callback_URL.png", "2538", "1374", "#54a4e4", "" ], "sizing": "full" } ] } [/block] [block:api-header] { "type": "basic", "title": "Test Your Bot" } [/block] On your mobile device, go to More from the main menu (three horizontal dots), select QR Code, and scan the code from your LINE bot settings page. [block:image] { "images": [ { "image": [ "https://files.readme.io/SLHQn7W4TTKbPK8vkQ9o_LINE_QR_code_mobile.png", "LINE_QR_code_mobile.png", "1440", "2560", "#e5473b", "" ] } ] } [/block] Your bot will appear in Chats: [block:image] { "images": [ { "image": [ "https://files.readme.io/aUMb2OKQn24YvZ9lOxag_LINE_bot_chat.png", "LINE_bot_chat.png", "1440", "2560", "#09c109", "" ] } ] } [/block] Chat with it: [block:image] { "images": [ { "image": [ "https://files.readme.io/aOeD6myxSgCvFqTf0ar2_LINE_bot_chatting.png", "LINE_bot_chatting.png", "1440", "2560", "#dedee5", "" ] } ] } [/block]