-
Notifications
You must be signed in to change notification settings - Fork 4
webhook quick start
찰스 edited this page Aug 2, 2023
·
1 revision
This is a simple test through WebHook. if you'd like to webhook test quickly using LINE Developers.NET, please following below description step by step.
- Messaging API → issue and copy to Channel access token (long-lived)
- download line webhook sample project
- Visual Studio → open line webhook sample project
- modify to your Channel access token in LineController constructor
- LineController.cs
public LineController()
{
_client = new LineMessagingClient("your channel access token"); //here
}- Visual Studio → F5
- take a note or remember of your localhost address and callback url.
- ex) localhost : https://localhost:7250, callback url: /line/callback
need to follow the below process for LINE Messenger Serever call directly your local webhook address.
- run ngrok with your local host in console
ngrok http https://localhost:7250/ - copy created host via ngrok

- LINE Developers Console → Messaging API → Webhook settings
- Use webhhook ✔
- Webhook URL → Edit → ngrok host + callback url → Update → Verifiy → Success
If you type some text on your channel, you'll get the message from LINE messenger which is set the webhook.
| LINE Developers | Methods |
|---|---|
| Message event | OnMessageEventAsync |
| Unsend event | OnUnSendEventAsync |
| Follow event | OnFollowEventAsync |
| Unfollow event | OnUnFollowEventAsync |
| Join event | OnJoinEventAsync |
| Leave event | OnLeaveEventAsync |
| Member join event | OnMemberJoinEventAsync |
| Member leave event | OnMemberLeaveEventAsync |
| Postback event | OnPostBackEventAsync |
| Video viewing complete event | OnVideoViewingCompleteEventAsync |
| Beacon event | OnBeaconEventAsync |
| Account link event | OnAccountLinkEventAsync |
| Device link event | OnThingsEventAsync |
| Device unlink event | OnThingsEventAsync |
| LINE Things scenario execution event | OnThingsEventAsync |
LINE Developers.NET WIKI