Skip to content

kiyoaki/LineMessagingApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LineMessagingApi

LINE Messaging API Client Library for .NET (C#)

Install

Quick Start

LineOAuthClient

Usage

var oAuthClient = new LineOAuthClient("Your Channel ID", "Your Channel Secret");

// get access token
var accessToken = await oAuthClient.GetAccessToken();

// revoke access token
await oAuthClient.RevokeAccessToken(accessToken);

LineWebhookRequest

Usage

var webhookRequest = new LineWebhookRequest("Your Channel Secret", HttpRequestMessage);

// verify X-Line-Signature and request body
var valid = await webhookRequest.IsValid();

// get content json
var json = await webhookRequest.GetContentJson();

// get deserialized object
var webhookContent = await webhookRequest.GetContent();

LineMessagingClient

Usage

var messagingClient = new LineMessagingClient("Access Token");

// push single message (text, image, video, audio...)
await messagingClient.PushMessage("User ID", ILineMessage);

// push multiple messages (text, image, video, audio...)
await messagingClient.PushMessage("User ID", IList<ILineMessage> messages);

// push single text message
await messagingClient.PushMessage("User ID", "text message");

// push multiple text message
await messagingClient.PushMessage("User ID", new [] { "text message 1", "text message 2" });

// multicast message
await messagingClient.MulticastMessage(LineMulticastMessage);

// multicast single text message
await messagingClient.MulticastMessage(new [] { "User ID 1", "User ID 2" }, "text message");

Methods

Type Name Summary
Task<String> CreateRichMenu(LineRichMenu richMenu)
Task DeleteRichMenu(String richMenuId)
Task<LineProfile> GetGroupMember(String groupId, String userId)
Task<LineMembers> GetGroupMembers(String groupId, String start = null)
Task<Byte[]> GetMessageContent(String messageId)
Task<LineProfile> GetProfile(String userId)
Task<LineRichMenuResponse> GetRichMenu(String richMenuId)
Task<Byte[]> GetRichMenuContent(String richMenuId)
Task<LineProfile> GetRoomMember(String roomId, String userId)
Task<LineMembers> GetRoomMembers(String roomId, String start = null)
Task<String> GetUsersRichMenuId(String userId)
Task LeaveGroup(String groupId)
Task LeaveRoom(String roomId)
Task LinkUsersRichMenu(String userId, String richMenuId)
Task MulticastMessage(LineMulticastMessage multicastMessage)
Task MulticastMessage(IEnumerable<String> to, ILineMessage message)
Task MulticastMessage(IEnumerable<String> to, IEnumerable<ILineMessage> messages)
Task MulticastMessage(IEnumerable<String> to, String message)
Task MulticastMessage(IEnumerable<String> to, String[] messages)
Task PushMessage(LinePushMessage pushMessage)
Task PushMessage(String to, ILineMessage message)
Task PushMessage(String to, IEnumerable<ILineMessage> messages)
Task PushMessage(String to, String message)
Task PushMessage(String to, String[] messages)
Task ReplyMessage(LineReplyMessage replyMessage)
Task ReplyMessage(String replyToken, IEnumerable<ILineMessage> messages)
Task ReplyMessage(String replyToken, String message)
Task ReplyMessage(String replyToken, String[] messages)
Task UnlinkUsersRichMenu(String userId)

Reference

LineMessagingApi API documents.

Generated by MarkdownGenerator

About

LINE Messaging API Client Library for .NET (C#)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages