-
Notifications
You must be signed in to change notification settings - Fork 642
Basic bot flow
moznion edited this page Feb 18, 2017
·
1 revision
- User actions something in talk room, or beacon event is fired (it sends the action to the LINE server)
- The LINE server sends the
event(s)
tocallback url
of your bot server as webhook. The event corresponds to users action - Your bot server receives
event(s)
and should handle it
When you create a bot, you should do three phases.
- Receive webhook
- Parse
event(s)
that is via webhook by \LINE\LINEBot#parseEventRequest(). You must pass the body of webhook and the signature to the method. The signature is included in theX_LINE_SIGNATURE
HTTP header - Switch processing depending on the type of event and do your domain