logo
การพัฒนา
ค้นหา
Line

Line

You can integrate your agents into Line to enable Line users interact with your agents via Line.

Preparations

  1. Visit Line Developers and log in to the console.

  2. After logging in, select an existing Provider from the Providers list or click the Create button above the list to create a new Provider and access its management page. If no Providers are configured, click the Create a new provider button on the page after logging in, then follow the platform's step-by-step instructions to complete the Provider creation process.

    image-20250418153526035

  3. In the provider's page, the Channels tab is displayed by default.

    If no channels are configured, you must first create one: Click the Create a Messaging API channel button and then follow the platform's step-by-step instructions. Upon successful channel creation, you will be redirected to the Channel page.

    image-20250418153837155
    image-20250418153912391
    image-20250418154024891

  4. After the creation is complete, go to the LINE Official Account Manager webpage. Click on Settings in the top-right corner. Then, click on Messaging API in the left sidebar. And finally, click Enable Messaging API in the center of the page.
    alt text

  5. Select which Provider this Channel should belong to, then follow the platform’s step-by-step instructions to complete the remaining process.
    alt text

  6. After completion, click the link below to return to the LINE Developers Console.
    alt text

  7. In the left sidebar, find the Provider that the Channel belongs to, and click on the Channel you just created.
    alt text

  8. Click Basic settings and copy Channel ID and Channel secret. You can paste them to a document for subsequent use.

    image-20250417150420222
    image-20250417150606368

  9. Click Messaging API and copy Channel access token. You can also paste it to a document for subsequent use.
    image-20250417151042373

Configuration in Agent

  1. Log in to GPTBots.

  2. Select the target Agent/Flow-Agent and access its Integration tab. (The feature of Integration is only available to a published agent/flow-agent; If you have changed the configurations of the target agent/flow-agent, you must save and publish the current version before performing Integration.)
    image-20250225121541516

  3. Select Line.

  4. Click Add Channel, then enter the Channel ID, Channel Secret, and Channel Access Token (no need to fill Channel Name), and click Verify.
    alt text
    alt text

  5. After successful verification, GPTBots will fetch the Channel name and profile picture you just set up in LINE. Once confirmed, click Save.
    alt text

  6. Upon success, the Channel details will be added to the list, and a Webhook URL will be generated below.
    alt text

  7. Next, copy this webhook URL and paste it to the corresponding field in the Managing API page of Line. Then click Verify.

    image-20250417161458342

  8. After the webhook URL is verified successfully, enable the Use Webhook toggle switch.
    alt text

  9. Upon successful configuration, a QR code will be generated and displayed in the Messaging API page. You can scan the QR code and send a message to start interacting with the chatbot on LINE.

    image-20250418154402815

Note: Even if the webhook is compromised, the absence of the Channel Secret will ensure that the LINE backend validates data requests to prevent forgery. If Channel secret and Channel access token are both compromised, you can reset them in the LINE backend.