Certains produits et fonctionnalités sont en cours de changement de nom. Les fonctionnalités de playbook et de flux génératifs sont également en cours de migration vers une console unique. Consultez les détails.
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
L'intégration de LINE dans les agents conversationnels (Dialogflow CX) vous permet de créer facilement des bots LINE avec une compréhension du langage naturel basée sur la technologie des agents conversationnels (Dialogflow CX).
Configurer LINE
Pour configurer l'intégration LINE pour votre agent, vous devez disposer des éléments suivants :
Un compte LINE
L'application LINE installée sur un appareil mobile
Créer un bot LINE
Suivez le guide LINE Premiers pas avec l'API Messaging pour créer un fournisseur et un canal d'API Messaging (si ce n'est pas déjà fait).
Copiez les informations suivantes à partir de la version créée dans LINE Developers Console :
Jeton d'accès au canal (longue durée)
ID de la catégorie
Secret du canal
Configurer des agents de conversation (Dialogflow CX)
Cliquez sur l'onglet Gérer dans le panneau de gauche.
Pour tester votre agent, suivez le guide LINE Ajouter des amis via un code QR afin d'ajouter le bot à la liste des conversations. Le code QR se trouve dans l'onglet API Messaging de la console des développeurs LINE.
Vous pouvez ensuite envoyer des messages au bot à des fins de test.
Messages de réponses enrichies
Les messages de réponses enrichies sont acceptés via une charge utile personnalisée dans Fulfillment. Consultez la section Objets de messages LINE pour connaître le format de message.
Par exemple, la charge utile personnalisée suivante fournit un message texte LINE simple :
{
"type": "text",
"text": "Hello, world"
}
La charge utile personnalisée suivante fournit un message LINE modèle :
Une fois que vous avez configuré les réponses spécifiques aux canaux, le canal DF_CX_LINE est automatiquement utilisé lorsque l'agent répond aux messages Line.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eConversational Agents (Dialogflow CX)'s LINE integration allows you to build LINE bots with natural language understanding capabilities.\u003c/p\u003e\n"],["\u003cp\u003eSetting up the LINE integration requires a LINE account, the LINE app, and information from your LINE Developers Console, including the Channel access token, Channel ID, and Channel secret.\u003c/p\u003e\n"],["\u003cp\u003eWhen using this integration, data is shared with both Google and LINE, and each company's terms of service, SLA, pricing, and quotas apply to their handling of the data.\u003c/p\u003e\n"],["\u003cp\u003eYou can test your LINE bot by adding it as a friend via a QR code found in the LINE Developers Console, and billing must be enabled on your project before testing.\u003c/p\u003e\n"],["\u003cp\u003eRich response messages in the LINE bot can be implemented using Custom Payload in Fulfillment, following LINE's Message Objects format, and you can use channel-specific responses for LINE messages by defining the \u003ccode\u003eDF_CX_LINE\u003c/code\u003e channel.\u003c/p\u003e\n"]]],[],null,["# LINE\n\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nConversational Agents (Dialogflow CX)'s LINE integration lets you to easily create LINE bots with natural\nlanguage understanding based on Conversational Agents (Dialogflow CX) technology.\n\n\n| **Note:** When using a third party integration, requests and end-user data are sent to both Google and the third party. The terms of service, SLA, pricing, and quotas [for your agent edition](/dialogflow/docs/editions) are applicable for Google's handling of these requests. The third party's terms of service, SLA, pricing, and quotas are applicable for the third party's handling of these requests.\n\n\u003cbr /\u003e\n\nSet Up LINE\n-----------\n\nIn order to set up the LINE integration for your agent, you'll need the\nfollowing:\n\n- A LINE account\n- The LINE app installed on a mobile device\n\n| **Note:** Account sign-up is completed through the mobile app.\n\n### Create a LINE bot\n\n1. Follow LINE's guide [Getting started with the Messaging API](https://developers.line.biz/en/docs/messaging-api/getting-started/) to create a provider and a **Messaging API** channel (if not created before).\n2. Copy the following information from the created channel in\n [LINE Developers Console](https://developers.line.biz/console/):\n\n - **Channel access token (long-lived)**\n - **Channel ID**\n - **Channel secret**\n\n### Set up Conversational Agents (Dialogflow CX)\n\n1. Click **Manage** tab on the left panel.\n2. Click **Integrations** in the left menu.\n3. Click the **Connect** button on the **Line** tile.\n4. Fill in the following information:\n - **Channel access token**\n - **Channel ID**\n - **Channel secret**\n5. Choose an environment, as applicable.\n6. Click **Start**.\n7. Copy the **Webhook URL**.\n\n### Enable webhook in LINE\n\nFollow LINE's guide\n[Set a Webhook URL](https://developers.line.biz/en/docs/messaging-api/building-bot/#setting-webhook-url)\nto finish the setup.\n\nTesting\n-------\n\n| **Note:** Make sure [billing is enabled](/dialogflow/cx/docs/quick/setup#billing) on your project before testing the integration.\n\nTo test your agent, follow LINE's guide\n[Adding friends via QR code](https://help.line.me/line/android/pc?lang=en&contentId=20000378)\nto add the bot to the conversation list. The QR code can be found on the\n**Messaging API** tab in the\n[LINE Developers Console](https://developers.line.biz/console/).\nAfter that, you can send messages to the bot for testing.\n\nRich response messages\n----------------------\n\nThe rich response messages are supported via **Custom Payload** in\n[Fulfillment](/dialogflow/cx/docs/concept/fulfillment). Please see\n[LINE Message Objects](https://developers.line.biz/en/reference/messaging-api/#message-objects)\nfor the message format.\n\nFor example, the following custom payload provides a simple LINE text message: \n\n```\n{\n \"type\": \"text\",\n \"text\": \"Hello, world\"\n}\n```\n\nThe following custom payload provides a LINE template message: \n\n```json\n{\n \"type\": \"template\",\n \"altText\": \"this is a buttons template\",\n \"template\": {\n \"type\": \"buttons\",\n \"thumbnailImageUrl\": \"https://example.com/bot/images/image.jpg\",\n \"title\": \"Menu\",\n \"text\": \"Please select\",\n \"actions\": [\n {\n \"type\": \"postback\",\n \"label\": \"Buy\",\n \"data\": \"action=buy&itemid=123\"\n },\n {\n \"type\": \"postback\",\n \"label\": \"Add to cart\",\n \"data\": \"action=add&itemid=123\"\n },\n {\n \"type\": \"uri\",\n \"label\": \"View detail\",\n \"uri\": \"http://example.com/page/123\"\n }\n ]\n }\n}\n```\n\nChannel specific responses\n--------------------------\n\nAfter you configure the [channel-specific responses](/dialogflow/cx/docs/concept/fulfillment#channel-specific), the channel `DF_CX_LINE` is automatically used when the agent responds to Line messages."]]