RapidAPI logo

LINE Messaging

FREE
By devrel_lineOfficial
Updated a month ago
Communication
5.1/10
Popularity Score
148ms
Latency
-
Success Rate

LINE Messaging API Documentation

LINE Messaging API lets you develop two-way communication between your service and LINE users. Push and reply messages Push messages are messages that your bot can send to users at any time. Reply messages are messages that your bot sends in response to users' messages. 1-on-1 and group chats Send messages not only to users who have added your bot as a friend but also in group chats that your bot has been added to.

View API Details
Profile
GETGet profile
Rich menu
POSTUnlink rich menus from multiple users
POSTSet default rich menu
POSTUpload rich menu image
DELETECancel default rich menu
POSTLink rich menu to multiple users
GETGet rich menu ID of user
GETDownload rich menu image
GETGet rich menu list
DELETEDelete rich menu
GETGet rich menu
DELETEUnlink rich menu from user
POSTCreate rich menu
POSTLink rich menu to user
GETGet default rich menu ID
OAuth
POSTIssue channel access token
POSTRevoke channel access token
Account link
POSTIssue link token
Message
GETGet content
GETGet number of sent reply messages
POSTSend reply message
GETGet profile

Gets user profile information.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
AuthorizationSTRING
REQUIREDBearer {channel access token}
Required Parameters
userIdSTRING
REQUIREDUser ID that is returned in a webhook event object. Do not use the LINE ID found on LINE.
Code Snippet
unirest.get("https://line-messaging1.p.rapidapi.com/bot/profile/{userId}")
.header("X-RapidAPI-Host", "line-messaging1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://line-messaging1.p.rapidapi.com/bot/profile/{userId}
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://line-messaging1.p.rapidapi.com/bot/profile/{userId}")
.header("X-RapidAPI-Host", "line-messaging1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication