Q&A

[Urgent] - Webhook event for LINE Official Account Bot is not fired for new user who has not accepted LINE Official Term before

Pre condition, Condition to reproduce

  1. New user who has not accepted Line Official Terms.
  2. An Line Messaging API of Official Account.
  3. User above add Line BOT as a friend.

Issue/ Error Message details

  1. A webview was shown for user to accept Official Terms.
  2. Webhook event (following) was not fired, So our BOT can not reply message to user above. Everything is working fine when we using develop account or the user have accepted Line Official Terms of other app before.

Accompanying respective source code

We are using PHP Line SDK.

$signature = $this->lineBot->signature($request->headers);
return $this->lineBot->client()->parseEventRequest($request->getContent(), $signature);

No event was received.

Resolution Tried

  • try Block then Unblock => We can receive event.
  • Using develop account => Everything work fine.

Reference information (Version / Platform/ environment)

Version: Line BOT PHP Sdk: 6.3.0 Platform: Laravel 8/Nginx Environment: AWS Fargate using phpdockerio/php73-fpm docker image.

  • 0
  • 1
  • 979
  • twitter facebook

I think messaging api doesn't send webhook to your service without a user accepting oficial terms. To resolve this, user accepts the term. There is no other way.

  • 0
Are you sure? question.vm