English
Methods
Talk Methods
All low-level TalkService methods are available on client.base.talk.
For example:
ts
await client.base.talk.sendMessage({
to: "u...",
text: "Hello, Vylinejs!",
e2ee: true,
});This is an example of encrypting a text message with e2ee and sending it to a user.
LIFF
client.liff.sendLiff() shares up to five validated LIFF messages with a recipient. Use client.liff.shareMessage() for one message or client.liff.shareMessages() for a message list. Set liffId to select an app other than the client's default; forceIssue requests a fresh token, and tryConsent controls the consent flow.
ts
import { liff } from "@nezumi0627/vylinejs";
await client.liff.sendLiff({
to: "u-recipient-mid",
messages: [
liff.text("Hello", {
label: "Vylinejs",
iconUrl: "https://example.com/avatar.png",
}),
],
tryConsent: true,
});sentBy is optional display attribution on text messages. It does not alter the authenticated account. LIFF sharing is restricted and changeable; an API success does not guarantee delivery. Review feature status and LIFF cautions before depending on it.
Square Methods
Square/OpenChat methods are inherited from LINEJS and remain available as a legacy surface. Vylinejs does not actively support Square or promise routine maintenance for it. The example below shows the existing method shape only.
All low-level SquareService methods are available on client.base.square.
For example:
ts
await client.base.square.findSquareByInvitationTicket({
request: {
invitationTicket: "INVITATION_TICKET",
},
});This is an example of getting square from invitation code.
BaseClient
If you just want simple api access or custom event handlers, you can use BaseClient.
For example:
ts
import { BaseClient } from "@nezumi0627/vylinejs/base";
const client = new BaseClient({ device: "DESKTOPWIN", version: "9.7.0.3556" });
client.on("pincall", (pin) => {
});
client.on("qrcall", (qrUrl) => {
});
client.on("update:authtoken", (authToken) => {
});
await client.loginProcess.login({
authToken: "...",
});
await client.loginProcess.login({
email: "...",
password: "...",
pincode: "123456",
});
await client.loginProcess.login({
qr: true,
});
await client.loginProcess.ready();
client.square // = SquareService
client.talk // = TalkService
// event polling
const polling = client.createPolling();
for await (const operation of polling.listenTalkEvents()) {
}
for await (const event of polling.listenSquareEvents()) {
}Calling LINE REST endpoints directly
Some LINE subsystems (Album/Moa, for example) speak JSON over HTTPS through the LEGY proxy rather than Thrift, but Vylinejs's default getHeader("GET") helper is tuned for Thrift and sets accept: application/x-thrift and content-type: application/x-thrift. If you call a JSON REST endpoint with those defaults you may get {"code":102001,"message":"一時的なエラーが発生しました。"} back with HTTP 200.
When you hand-craft a REST request, override both headers to application/json:
ts
const headers = {
...client.base.request.getHeader("GET"),
accept: "application/json",
"content-type": "application/json; charset=UTF-8",
"X-Line-ChannelToken": token,
"X-Line-Mid": client.base.profile!.mid,
};
const res = await client.base.fetch(url, {
method: "POST",
headers,
body: new Uint8Array(),
signal: AbortSignal.timeout(client.base.config.timeout),
});
if (!res.ok) throw new Error(`REST request failed: HTTP ${res.status}`);
const data = await res.json();
if (data.code !== undefined && data.code !== 0) {
throw new Error(`REST request failed: code ${data.code}`);
}Use client.base.moa for album operations; it handles these headers and checks HTTP and application errors for you.
LINE VOOM ended on 2026-09-30. LINE says access, post viewing and creation, and post-data restore ended with the service (official notice). Vylinejs keeps the old VOOM and Timeline exports temporarily for source compatibility, marks them deprecated, and fails immediately without issuing a token or making a request. There is no replacement for those endpoints.
LINE Official Accounts have a separate "Posts" feature, but it is not the former VOOM API and this library does not expose it as a replacement (LINE for Business notice).