VX Agents

OpenAPI Marketplace · Messaging & SMS

LINE Messaging API

v1.0.0 · 10 endpoints · 0 connections · shared by vx.ai

For shops and clinics that talk to customers on a LINE Official Account: answer chats with free reply tokens, push or broadcast text, sticker and Flex messages, look up a follower's profile and keep an eye on the monthly message quota before a campaign goes out.

Connect this API to an AI agent Browse all specs

What you can do with LINE Messaging API via MCP

Every endpoint below becomes a governed tool your AI agent (Claude, ChatGPT, or a customer-facing VX agent) can call — with scoped permissions, sandbox testing, and audit logs.

MethodPathOperationDescription
GET /v2/bot/info getBotInfo Get the Official Account's name, basic id and chat mode
GET /v2/bot/message/quota getMessageQuota Get the monthly limit for paid (push, multicast, broadcast) messages
GET /v2/bot/message/quota/consumption getMessageQuotaConsumption Get how many paid messages were sent this month
GET /v2/bot/profile/{userId} getUserProfile Get a friend's display name, picture and status message
GET /v2/bot/followers/ids getFollowerIds List user ids of people who added the account as a friend
POST /v2/bot/message/validate/push validatePushMessage Check that message objects are valid without sending them
POST /v2/bot/message/reply replyMessage Reply to a user's message using the webhook reply token (free)
POST /v2/bot/message/push pushMessage Send messages to one user, group or room at any time
POST /v2/bot/message/multicast multicastMessage Send the same messages to up to 500 user ids
POST /v2/bot/message/broadcast broadcastMessage Send messages to every friend of the account

Authentication

Bearer

Bearer token — sent as Authorization: Bearer <token>

LINE channel access token, sent as Authorization: Bearer <token>.

How to get a credential

  1. Sign in to the LINE Developers Console with the LINE account that manages your LINE Official Account.
  2. Open your provider and the Messaging API channel linked to the Official Account (create one from LINE Official Account Manager > Settings > Messaging API if it does not exist).
  3. On the Messaging API tab, scroll to Channel access token (long-lived) and click Issue.
  4. Copy the token. Long-lived tokens do not expire until you reissue them; keep them secret.

Permissions used

Access Operations
Channel access token (no scopes) all operations: replyMessage, pushMessage, multicastMessage, broadcastMessage, validatePushMessage, getMessageQuota, getMessageQuotaConsumption, getUserProfile, getFollowerIds, getBotInfo
Verified or premium account only getFollowerIds

Common errors

Status Meaning Fix
401 Token missing, wrong or reissued Issue a new long-lived token and update the credential
403 Plan or account type does not allow the call (e.g. follower ids on an unverified account) Use a verified/premium account or skip the call
400 Invalid message object, expired or reused reply token, or bad user id Validate the message first; a reply token works once and only shortly after the webhook event
429 Rate limit or monthly message quota reached Back off; check getMessageQuota and getMessageQuotaConsumption

Store the token as a VX Agents credential (bearer token) so it is never pasted into chats or prompts.

Usage guide

Setup

  • Credential: a long-lived channel access token from the LINE Developers Console (Messaging API channel). Store it as a VX Agents bearer credential.
  • Call getBotInfo once to confirm the token belongs to the right Official Account.
  • Reply tokens come from your webhook events (message, follow, postback); this spec does not receive webhooks itself.

Message a customer

  1. If you have a fresh replyToken from a webhook event, use replyMessage (free, up to 5 messages).
  2. Otherwise check getMessageQuota and getMessageQuotaConsumption: push, multicast and broadcast count against the monthly quota.
  3. Look up the person with getUserProfile to address them by display name.
  4. Build the messages and run validatePushMessage to catch format errors.
  5. Show the recipients and the exact text to the user and get confirmation, then call pushMessage (one user, group or room), multicastMessage (up to 500 user ids) or broadcastMessage (every friend).

Good to know

  • Message objects: text, sticker (packageId + stickerId), image (HTTPS URLs), flex (altText + contents bubble/carousel). Max 5 messages per request.
  • A reply token can be used once and expires shortly after the event (about a minute); fall back to push if it fails.
  • User ids start with U and are per provider; group ids start with C, room ids with R.
  • getFollowerIds works only for verified or premium accounts; page with the start token (max 1,000 ids per page).
  • Send a UUID in X-Line-Retry-Key when retrying a push, multicast or broadcast so a timeout does not deliver twice.
  • Broadcast reaches every friend and spends quota: always confirm first.

Source: LINE Messaging API reference (https://developers.line.biz/en/reference/messaging-api/), checked 2026-10-16.

How to use this spec

  1. Create a free VX Agents account (sandbox tools included).
  2. Open the marketplace and connect “LINE Messaging API” to an agent.
  3. Expose it as an MCP server for Claude/ChatGPT, or chat with it directly.

Related APIs