Line Messaging API
87 min
the line messaging api connector enables communication with users on the line platform through various messaging capabilities the line messaging api connector for swimlane turbine provides a powerful suite of actions to enhance user engagement and streamline communication management within the line platform by integrating with line's messaging api, users can automate a variety of tasks such as sending messages, managing message delivery, and analyzing communication patterns this connector empowers security teams to interact with line users directly, monitor chat activities, and gather valuable insights—all within the swimlane turbine environment limitations none to date supported versions this line messaging api connector uses the latest version api additional docs line messaging api api documentation link https //developers line biz/en/reference/messaging api/#messages configuration prerequisites to utilize the line messaging api connector with swimlane turbine, ensure you have the following prerequisites oauth 2 0 client credentials for secure authentication url endpoint url for the line messaging api client id unique identifier for your application to authenticate with line client secret a secret key provided by line for authenticating your application token url url to retrieve the oauth token from line authentication methods oauth2 password credentials with the following parameters url the endpoint url for the line messaging api api token url your line messaging api token url client secret the client secret associated with your line messaging api account client id the client identifier as registered in line messaging api for oauth authentication capabilities this line messaging api connector provides the following capabilities display a loading animation get narrowcast message status get number of messages sent this month get number of sent broadcast messages get number of sent multicast messages get number of sent push messages get number of sent reply messages get the target limit for sending messages this month send broadcast message send multicast message send narrowcast message send push message send reply message validate message objects of a broadcast message validate message objects of a multicast message and so on display a loading animation display a loading animation in one on one chats between users and line official accounts line messaging api's documentation for this action can be found here https //developers line biz/en/reference/messaging api/#display a loading indicator get narrowcast message status retrieve the status of a narrowcast message sent to a specific audience line messaging api's documentation for this action can be found here https //developers line biz/en/reference/messaging api/#get narrowcast progress status get number of messages sent this month get the total number of messages sent from your line official account in the current month line messaging api's documentation for this action can be found here https //developers line biz/en/reference/messaging api/#get consumption get number of sent reply messages retrieve the number of reply messages sent from your line official account line messaging api's documentation for this action can be found here https //developers line biz/en/reference/messaging api/#get number of reply messages get the target limit for sending messages this month get the target limit for the number of messages that can be sent from your line official account in the current month line messaging api's documentation for this action can be found here https //developers line biz/en/reference/messaging api/#get quota send broadcast message send a broadcast message to all users who have added your line official account line messaging api's documentation for this action can be found here https //developers line biz/en/reference/messaging api/#send broadcast message send multicast message send a multicast message to multiple users at once line messaging api's documentation for this action can be found here https //developers line biz/en/reference/messaging api/#send multicast message send narrowcast message send a narrowcast message to a specific audience based on demographic filters line messaging api's documentation for this action can be found here https //developers line biz/en/reference/messaging api/#send narrowcast message send push message send a push message to a specific user line messaging api's documentation for this action can be found here https //developers line biz/en/reference/messaging api/#send push message send reply message send a reply message in response to an event line messaging api's documentation for this action can be found here https //developers line biz/en/reference/messaging api/#send reply message configurations line oauth 2 0 client credentials authenticates using oauth 2 0 client credentials configuration parameters parameter description type required url a url to the target host string required token url string required client id the client id string required client secret the client secret string required verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional actions display a loading animation displays a loading animation in direct chats with line official accounts using the provided chatid endpoint url v2/bot/chat/loading/start method post input argument name type required description chatid string required user id of the target user for whom the loading animation is to be displayed loadingseconds number optional number of seconds to display a loading animation you can specify a any one of 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, or 60 output parameter type description status code number http status code of the response reason string response reason phrase example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "900e2954 b41a 4dc9 87f7 f7782d73368e", "x xss protection" "1; mode=block", "content length" "16", "expires" "mon, 03 feb 2025 09 51 53 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "mon, 03 feb 2025 09 51 53 gmt", "connection" "keep alive" }, "reason" "ok", "json body" {} } ] get narrowcast message status retrieves the delivery status of a narrowcast message sent through line messaging api using a specific requestid endpoint url v2/bot/message/progress/narrowcast method get input argument name type required description requestid string required the narrowcast message's request id each messaging api request has a request id find it in the response headers output parameter type description status code number http status code of the response reason string response reason phrase message string response message example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "900e2954 b41a 4dc9 87f7 f7782d73368e", "x xss protection" "1; mode=block", "content length" "16", "expires" "mon, 03 feb 2025 09 51 53 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "mon, 03 feb 2025 09 51 53 gmt", "connection" "keep alive" }, "reason" "ok", "json body" { "message" "not found" } } ] get number of messages sent this month retrieve the total count of messages sent in the current month via line messaging api endpoint url v2/bot/message/quota/consumption method get output parameter type description status code number http status code of the response reason string response reason phrase totalusage number output field totalusage example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "900e2954 b41a 4dc9 87f7 f7782d73368e", "x xss protection" "1; mode=block", "content length" "16", "expires" "mon, 03 feb 2025 09 51 53 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "mon, 03 feb 2025 09 51 53 gmt", "connection" "keep alive" }, "reason" "ok", "json body" { "totalusage" 0 } } ] get number of sent broadcast messages retrieves the count of messages sent using the line messaging api's broadcast endpoint on a specified date endpoint url v2/bot/message/delivery/broadcast method get input argument name type required description date string required date the messages were sent format yyyymmdd (e g 20191231), timezone utc+9 output parameter type description status code number http status code of the response reason string response reason phrase status string status value success number whether the operation was successful example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "d84edc66 4ebe 438f bcb4 0e1586464499", "x xss protection" "1; mode=block", "content length" "30", "expires" "wed, 12 feb 2025 06 30 06 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "wed, 12 feb 2025 06 30 06 gmt", "connection" "keep alive" }, "reason" "ok", "json body" { "status" "ready", "success" 0 } } ] get number of sent multicast messages retrieves the count of messages sent using the line messaging api's multicast endpoint on a specified date endpoint url v2/bot/message/delivery/multicast method get input argument name type required description date string required date the messages were sent format yyyymmdd (e g 20191231), timezone utc+9 output parameter type description status code number http status code of the response reason string response reason phrase status string status value success number whether the operation was successful example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "83c791c5 7780 4ae5 bd30 7e5d2c15a26a", "x xss protection" "1; mode=block", "content length" "30", "expires" "wed, 12 feb 2025 06 16 59 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "wed, 12 feb 2025 06 16 59 gmt", "connection" "keep alive" }, "reason" "ok", "json body" { "status" "ready", "success" 0 } } ] get number of sent push messages retrieves the count of messages sent using the /bot/message/push endpoint on a specified date endpoint url v2/bot/message/delivery/push method get input argument name type required description date string required date the messages were sent format yyyymmdd (e g 20191231), timezone utc+9 output parameter type description status code number http status code of the response reason string response reason phrase status string status value success number whether the operation was successful example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "11de3c6d 3882 4b86 baeb 2c99891b3aa0", "x xss protection" "1; mode=block", "content length" "30", "expires" "wed, 12 feb 2025 06 13 12 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "wed, 12 feb 2025 06 13 12 gmt", "connection" "keep alive" }, "reason" "ok", "json body" { "status" "ready", "success" 0 } } ] get number of sent reply messages retrieves the count of reply messages sent via line messaging api on a specified date, requiring the 'date' parameter endpoint url v2/bot/message/delivery/reply method get input argument name type required description date string required date the messages were sent format yyyymmdd (e g 20191231), timezone utc+9 output parameter type description status code number http status code of the response reason string response reason phrase status string status value success number whether the operation was successful example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "c1e87e66 b43a 4fa4 a672 3230e2ed059b", "x xss protection" "1; mode=block", "content length" "30", "expires" "mon, 03 feb 2025 09 54 51 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "mon, 03 feb 2025 09 54 51 gmt", "connection" "keep alive" }, "reason" "ok", "json body" { "status" "ready", "success" 0 } } ] get the target limit for messages this month retrieve the current month's messaging limits, including free and additional message counts, from line messaging api endpoint url v2/bot/message/quota method get output parameter type description status code number http status code of the response reason string response reason phrase type string type of the resource value number value for the parameter example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "0df9d9c5 f7df 4650 bf5a 75fc210fc7d7", "x xss protection" "1; mode=block", "content length" "30", "expires" "mon, 03 feb 2025 09 51 06 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "mon, 03 feb 2025 09 51 06 gmt", "connection" "keep alive" }, "reason" "ok", "json body" { "type" "limited", "value" 500 } } ] send broadcast message sends a broadcast message to all friends of the line official account using specified recipient and message details endpoint url v2/bot/message/broadcast method post input argument name type required description headers object optional http headers for the request x line retry key string required uuid to string required id of the target recipient use a userid, groupid, or roomid value returned in a webhook event object messages array required messages to send by using the validate message objects of a push message endpoint, you can validate the message objects type string optional type of message to send text string optional message text notificationdisabled boolean optional the user doesn't receive a push notification when the message is sent if set to true customaggregationunits array optional name of aggregation unit output parameter type description status code number http status code of the response reason string response reason phrase example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "900e2954 b41a 4dc9 87f7 f7782d73368e", "x xss protection" "1; mode=block", "content length" "16", "expires" "mon, 03 feb 2025 09 51 53 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "mon, 03 feb 2025 09 51 53 gmt", "connection" "keep alive" }, "reason" "ok", "json body" {} } ] send multicast message efficiently sends identical messages to multiple users on line, requiring recipient ids and message content endpoint url v2/bot/message/multicast method post input argument name type required description headers object optional http headers for the request x line retry key string required uuid to string required id of the target recipient use a userid, groupid, or roomid value returned in a webhook event object messages array required messages to send by using the validate message objects of a push message endpoint, you can validate the message objects type string optional type of message to send text string optional message text notificationdisabled boolean optional the user doesn't receive a push notification when the message is sent if set to true customaggregationunits array optional name of aggregation unit output parameter type description status code number http status code of the response reason string response reason phrase message string response message example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "900e2954 b41a 4dc9 87f7 f7782d73368e", "x xss protection" "1; mode=block", "content length" "16", "expires" "mon, 03 feb 2025 09 51 53 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "mon, 03 feb 2025 09 51 53 gmt", "connection" "keep alive" }, "reason" "ok", "json body" { "message" "the property, to\[1], in the request body is invalid (line , column )" } } ] send narrowcast message send targeted messages to specific line users based on attributes such as age, gender, os, and region, or utilize retargeting audiences endpoint url v2/bot/message/narrowcast method post input argument name type required description headers object optional http headers for the request x line retry key string required uuid messages array required messages to send by using the validate message objects of a push message endpoint, you can validate the message objects type string optional type of message to send text string optional message text recipient object optional parameter for send narrowcast message type string required type and array optional create a new recipient object by taking the logical conjunction (and) of the specified array of recipient objects type string required type of the resource audiencegroupid number required the audience id create audiences with the manage audience api not object optional parameter for send narrowcast message type string required type audiencegroupid number optional the audience id create audiences with the manage audience api filter object optional parameter for send narrowcast message demographic object optional demographic filter objects represent criteria (e g age, gender, os, region, and friendship duration) on which to filter the list of recipients type string optional type or array optional parameter for send narrowcast message type string optional type and array optional this lets you filter recipients with a given age range limit object optional you can set a limit on the maximum number of narrowcast messages that can be sent max number optional the maximum number of narrowcast messages to send use this parameter to limit the number of narrowcast messages sent the recipients will be chosen at random uptoremainingquota boolean optional if true, the message will be sent within the maximum number of deliverable messages the default value is false targets will be selected at random notificationdisabled boolean optional the user doesn't receive a push notification when the message is sent if set to true output parameter type description status code number http status code of the response reason string response reason phrase message string response message example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "900e2954 b41a 4dc9 87f7 f7782d73368e", "x xss protection" "1; mode=block", "content length" "16", "expires" "mon, 03 feb 2025 09 51 53 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "mon, 03 feb 2025 09 51 53 gmt", "connection" "keep alive" }, "reason" "ok", "json body" { "message" "invalid audience group id {audience id}" } } ] send push message sends a direct message to a line user, group, or multi person chat without user interaction, requiring 'to' and 'messages' parameters endpoint url v2/bot/message/push method post input argument name type required description headers object optional http headers for the request x line retry key string required uuid to string required id of the target recipient use a userid, groupid, or roomid value returned in a webhook event object messages array required messages to send by using the validate message objects of a push message endpoint, you can validate the message objects type string optional type of message to send text string optional message text notificationdisabled boolean optional the user doesn't receive a push notification when the message is sent if set to true customaggregationunits array optional name of aggregation unit output parameter type description status code number http status code of the response reason string response reason phrase sentmessages array response message id string unique identifier quotetoken string output field quotetoken example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "900e2954 b41a 4dc9 87f7 f7782d73368e", "x xss protection" "1; mode=block", "content length" "16", "expires" "mon, 03 feb 2025 09 51 53 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "mon, 03 feb 2025 09 51 53 gmt", "connection" "keep alive" }, "reason" "ok", "json body" { "sentmessages" \[] } } ] send reply message sends a custom response to events in line chats using a replytoken and predefined messages endpoint url v2/bot/message/reply method post input argument name type required description headers object optional http headers for the request x line retry key string required uuid replytoken string required reply token received via webhook notificationdisabled boolean optional the user doesn't receive a push notification when the message is sent if set to true messages array required by using the validate message objects of a reply message endpoint, you can validate the message objects type string optional type of the resource text string optional parameter for send reply message output parameter type description status code number http status code of the response reason string response reason phrase sentmessages array response message id string unique identifier quotetoken string output field quotetoken example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "900e2954 b41a 4dc9 87f7 f7782d73368e", "x xss protection" "1; mode=block", "content length" "16", "expires" "mon, 03 feb 2025 09 51 53 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "mon, 03 feb 2025 09 51 53 gmt", "connection" "keep alive" }, "reason" "ok", "json body" { "sentmessages" \[] } } ] validate message objects of a broadcast message validates an array of message objects for the 'send broadcast message' endpoint in line messaging api, excluding property values other than 'messages' endpoint url v2/bot/message/validate/broadcast method post input argument name type required description messages array required array of message objects to validate type string required type of the resource text string required parameter for validate message objects of a broadcast message output parameter type description status code number http status code of the response reason string response reason phrase example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "7c147a0a a35e 4ca1 ada2 2cac14826023", "x xss protection" "1; mode=block", "content length" "2", "expires" "wed, 12 feb 2025 06 39 55 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "wed, 12 feb 2025 06 39 55 gmt", "connection" "keep alive" }, "reason" "ok", "json body" {} } ] validate message objects of a multicast message validates an array of message objects for the 'messages' property in a multicast message request to ensure compliance with line messaging api endpoint url v2/bot/message/validate/multicast method post input argument name type required description messages array required array of message objects to validate type string required type of the resource text string required parameter for validate message objects of a multicast message output parameter type description status code number http status code of the response reason string response reason phrase example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "9d28f8e6 1474 4a29 b7fb da7e0584fad4", "x xss protection" "1; mode=block", "content length" "2", "expires" "wed, 12 feb 2025 06 38 01 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "wed, 12 feb 2025 06 38 01 gmt", "connection" "keep alive" }, "reason" "ok", "json body" {} } ] validate message objects of a narrowcast message validates an array of message objects for the 'send narrowcast message' endpoint in line messaging api, excluding property values outside 'messages' endpoint url /v2/bot/message/validate/narrowcast method post input argument name type required description messages array required array of message objects to validate type string required type of the resource text string required parameter for validate message objects of a narrowcast message output parameter type description status code number http status code of the response reason string response reason phrase example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "ee4bcd93 d4fa 482e be9d a23056afa4d2", "x xss protection" "1; mode=block", "content length" "2", "expires" "wed, 12 feb 2025 06 41 52 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "wed, 12 feb 2025 06 41 52 gmt", "connection" "keep alive" }, "reason" "ok", "json body" {} } ] validate message objects of a push message validates an array of message objects for the 'messages' property in a push message request to ensure compliance with line messaging api endpoint url v2/bot/message/validate/push method post input argument name type required description messages array required array of message objects to validate type string required type of the resource text string required parameter for validate message objects of a push message output parameter type description status code number http status code of the response reason string response reason phrase example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "df4c46a1 18dd 4a87 9e1f 22713bda80a4", "x xss protection" "1; mode=block", "content length" "2", "expires" "wed, 12 feb 2025 06 35 25 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "wed, 12 feb 2025 06 35 25 gmt", "connection" "keep alive" }, "reason" "ok", "json body" {} } ] validate message objects of a reply message validates an array of message objects for the 'messages' property in a reply message request to ensure compatibility with the line messaging api endpoint url v2/bot/message/validate/reply method post input argument name type required description messages array required array of message objects to validate type string required type of the resource text string required parameter for validate message objects of a reply message output parameter type description status code number http status code of the response reason string response reason phrase example \[ { "status code" 200, "response headers" { "server" "legy", "content type" "application/json", "x content type options" "nosniff", "x frame options" "deny", "x line request id" "cc912291 63ef 4ab0 a04d 5b0bbccedfd7", "x xss protection" "1; mode=block", "content length" "2", "expires" "wed, 12 feb 2025 06 32 39 gmt", "cache control" "max age=0, no cache, no store", "pragma" "no cache", "date" "wed, 12 feb 2025 06 32 39 gmt", "connection" "keep alive" }, "reason" "ok", "json body" {} } ] response headers header description example cache control directives for caching mechanisms max age=0, no cache, no store connection http response header connection keep alive content length the length of the response body in bytes 2 content type the media type of the resource application/json date the date and time at which the message was originated mon, 03 feb 2025 09 51 06 gmt expires the date/time after which the response is considered stale wed, 12 feb 2025 06 38 01 gmt pragma http response header pragma no cache server information about the software used by the origin server legy x content type options http response header x content type options nosniff x frame options http response header x frame options deny x line request id http response header x line request id ee4bcd93 d4fa 482e be9d a23056afa4d2 x xss protection http response header x xss protection 1; mode=block