A Node.js client library for the LINE Messaging API, version 1.1.0. Maintained as part of the Yoctol messaging-apis monorepo, it provides a comprehensive, TypeScript-first wrapper for LINE's REST endpoints including reply, push, multicast, broadcast, and rich menu APIs. The library uses axios for HTTP and wraps errors for better debugging. Key differentiators: full TypeScript types, camelCase key support (v1.0.0+), factory methods for message creation, and support for Flex and Imagemap messages. Release cadence is sporadic with the last release in October 2021.
npm install messaging-api-lineVerified import paths — ran on the pinned version, not inferred.
Initializes LineClient with credentials, then demonstrates reply, push, broadcast, and getBotInfo APIs.
Update all API parameters and message objects to use camelCase keys (e.g., replyToken → replyToken, originalContentUrl → originalContentUrl).
Change imports from 'messaging-api-line/dist/LineClient' to 'messaging-api-line'.
Track used tokens and only reply once per webhook event.
Always use camelCase keys for message fields to ensure compatibility with future versions.
Provide a valid replyToken from the webhook event (e.g., req.body.events[0].replyToken). Ensure environment variable is set.
Verify LINE_ACCESS_TOKEN and LINE_CHANNEL_SECRET are set and passed correctly.
Regenerate access token from LINE Developers console and update your code.
Upgrade to messaging-api-line@1.1.0 or later. npm install messaging-api-line@latest