{ "info": { "_postman_id": "731ed817-f2f9-4d8a-8223-4e5be0a086b4", "name": "CLASS LINE API Example", "description": "สวัสดีครับทุกท่าน เราโอ๋ เทพนที โพธิ์จันทร์ [LINE API Expert](https://)\n\nPostman Collection Class LINE API Expert นี้\n\nได้ทำไว้เพื่อเป็นประโยชน์ แก่สาธารณะ ห้ามมิให้นำไปใช้เชิงพาณิชย์\n\nหวังให้เป็นประโยชน์แด่เพื่อนๆ ชาว LINE Developers ทุกท่าน ขอบคุณครับ", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "4070169" }, "item": [ { "name": "Messaging API", "item": [ { "name": "Channel access token", "item": [ { "name": "Type", "item": [ { "name": "short-lived", "item": [ { "name": "Issue short-lived channel access token", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"access_token\", jsonData.access_token);" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "client_credentials", "type": "text" }, { "key": "client_id", "value": "{{client_id}}", "description": "channel id", "type": "text" }, { "key": "client_secret", "value": "{{client_secret}}", "description": "channel secret", "type": "text" } ] }, "url": { "raw": "https://api.line.me/v2/oauth/accessToken", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "oauth", "accessToken" ] } }, "response": [] }, { "name": "Verify the validity of short-lived and long-lived channel access tokens", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "access_token", "value": "{{access_token}}", "type": "text" } ] }, "url": { "raw": "https://api.line.me/v2/oauth/verify", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "oauth", "verify" ] } }, "response": [] }, { "name": "Revoke short-lived or long-lived channel access token", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "access_token", "value": "{{access_token}}", "type": "text" } ] }, "url": { "raw": "https://api.line.me/v2/oauth/revoke", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "oauth", "revoke" ] } }, "response": [] } ] }, { "name": "V2.1", "item": [ { "name": "Issue channel access token v2.1", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "client_credentials", "type": "text" }, { "key": "client_assertion_type", "value": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", "type": "text" }, { "key": "client_assertion", "value": "{{JWT}}", "type": "text" } ] }, "url": { "raw": "https://api.line.me/oauth2/v2.1/token", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "oauth2", "v2.1", "token" ] } }, "response": [] }, { "name": "Verify the validity of the channel access token v2.1", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "access_token", "value": "eyJhbGciOiJIUzI1NiJ9.UnQ_o-GP0VtnwDjbK0C8E_NvK...", "type": "text" } ] }, "url": { "raw": "https://api.line.me/oauth2/v2.1/verify?access_token={{access_token}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "oauth2", "v2.1", "verify" ], "query": [ { "key": "access_token", "value": "{{access_token}}" } ] } }, "response": [] }, { "name": "Revoke channel access token v2.1", "request": { "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "client_id", "value": "{{client_id}}", "type": "text" }, { "key": "client_secret", "value": "{{client_secret}}", "type": "text" }, { "key": "access_token", "value": "{{access_token}}", "type": "text" } ] }, "url": { "raw": "https://api.line.me/oauth2/v2.1/revoke", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "oauth2", "v2.1", "revoke" ] } }, "response": [] }, { "name": "Get all valid channel access token key IDs v2.1", "request": { "method": "GET", "header": [], "url": { "raw": "https://api.line.me/oauth2/v2.1/tokens/kid?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&client_assertion={{JWT}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "oauth2", "v2.1", "tokens", "kid" ], "query": [ { "key": "client_assertion_type", "value": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer" }, { "key": "client_assertion", "value": "{{JWT}}" } ] } }, "response": [] } ] }, { "name": "stateless", "item": [ { "name": "Issue", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"access_token\", jsonData.access_token);" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "client_credentials", "type": "text" }, { "key": "client_id", "value": "{{client_id}}", "description": "channel id", "type": "text" }, { "key": "client_secret", "value": "{{client_secret}}", "description": "channel secret", "type": "text" } ] }, "url": { "raw": "https://api.line.me/oauth2/v3/token", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "oauth2", "v3", "token" ] } }, "response": [] } ] } ] } ] }, { "name": "Message", "item": [ { "name": "Message GET", "item": [ { "name": "Statistics", "item": [ { "name": "Get statistics per unit", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "customAggregationUnit", "value": "promotion_a", "type": "text" }, { "key": "from", "value": "20210301", "type": "text" }, { "key": "to", "value": "20210331", "type": "text" } ] }, "url": { "raw": "https://api.line.me/v2/bot/insight/message/event/aggregation?customAggregationUnit=promotion_a&from=20210301&to=20210331", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "insight", "message", "event", "aggregation" ], "query": [ { "key": "customAggregationUnit", "value": "promotion_a" }, { "key": "from", "value": "20210301" }, { "key": "to", "value": "20210331" } ] }, "description": "# Get statistics of sent messages\n\nYou can get statistics per aggregation unit of how users interact with [push messages](https://developers.line.biz/en/reference/messaging-api/#send-push-message) and [multicast messages](https://developers.line.biz/en/reference/messaging-api/#send-multicast-message) you send to multiple users.\n\nNormally, you can't get statistics about actions that users perform on messages, such as opening a message or tapping a URL, to protect user privacy. However, it is possible to get statistics by aggregating into units you define and making it impossible to identify individuals.\n\nAs illustrated below, you can get statistics for each unit by assigning a unit name and sending a message.\n\n[https://developers.line.biz/en/docs/messaging-api/unit-based-statistics-aggregation/#about-message-statistics](https://developers.line.biz/en/docs/messaging-api/unit-based-statistics-aggregation/#about-message-statistics)" }, "response": [] }, { "name": "Get number of units used this month", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/v2/bot/message/aggregation/info", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "aggregation", "info" ] } }, "response": [] }, { "name": "Get name list of units used this month", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "limit", "value": "30", "type": "text" } ] }, "url": { "raw": "https://api.line.me/v2/bot/message/aggregation/list?limit=30", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "aggregation", "list" ], "query": [ { "key": "limit", "value": "30" } ] } }, "response": [] } ] }, { "name": "Getting content", "item": [ { "name": "Get content", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api-data.line.me/v2/bot/message/{{messageId}}/content", "protocol": "https", "host": [ "api-data", "line", "me" ], "path": [ "v2", "bot", "message", "{{messageId}}", "content" ] } }, "response": [] }, { "name": "Verify the preparation status of a video or audio for getting", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api-data.line.me/v2/bot/message/{{messageId}}/content/transcoding", "protocol": "https", "host": [ "api-data", "line", "me" ], "path": [ "v2", "bot", "message", "{{messageId}}", "content", "transcoding" ] } }, "response": [] }, { "name": "Get a preview image of the image or video", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api-data.line.me/v2/bot/message/{{messageId}}/content/preview", "protocol": "https", "host": [ "api-data", "line", "me" ], "path": [ "v2", "bot", "message", "{{messageId}}", "content", "preview" ] } }, "response": [] } ] }, { "name": "Get narrowcast message status", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/message/progress/narrowcast?requestId={{request_id}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "progress", "narrowcast" ], "query": [ { "key": "requestId", "value": "{{request_id}}" } ] } }, "response": [] }, { "name": "Get the target limit for additional messages", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/message/quota", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "quota" ] } }, "response": [ { "name": "Get the target limit for additional messages", "originalRequest": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/message/quota", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "quota" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "x-line-request-id", "value": "67a33822-60bf-4c03-9a05-6882e48cc95e" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Expires", "value": "Sat, 29 May 2021 07:52:37 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Sat, 29 May 2021 07:52:37 GMT" }, { "key": "Content-Length", "value": "50" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"type\": \"limited\",\n \"value\": 1000\n}" } ] }, { "name": "Get number of messages sent this month", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/message/quota/consumption", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "quota", "consumption" ] } }, "response": [ { "name": "Get number of messages sent this month", "originalRequest": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/message/quota/consumption", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "quota", "consumption" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "x-line-request-id", "value": "a10eac45-d28d-4512-bbc3-38aa1d434e7b" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Content-Length", "value": "16" }, { "key": "Expires", "value": "Sat, 29 May 2021 07:53:41 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Sat, 29 May 2021 07:53:41 GMT" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"totalUsage\": 4\n}" } ] }, { "name": "Get number of sent reply messages", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json", "disabled": true } ], "url": { "raw": "https://api.line.me/v2/bot/message/delivery/reply?date=20250527", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "delivery", "reply" ], "query": [ { "key": "date", "value": "20250527" } ] } }, "response": [ { "name": "Get number of sent reply messages", "originalRequest": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json", "disabled": true } ], "url": { "raw": "https://api.line.me/v2/bot/message/delivery/reply?date=20210527", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "delivery", "reply" ], "query": [ { "key": "date", "value": "20210527" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "x-line-request-id", "value": "8e0d686a-a8b0-4e44-b6d8-be1f826b470c" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Content-Length", "value": "31" }, { "key": "Expires", "value": "Sat, 29 May 2021 07:54:42 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Sat, 29 May 2021 07:54:42 GMT" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"status\": \"ready\",\n \"success\": 13\n}" } ] }, { "name": "Get number of sent push messages", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json", "disabled": true } ], "url": { "raw": "https://api.line.me/v2/bot/message/delivery/push?date=20250528", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "delivery", "push" ], "query": [ { "key": "date", "value": "20250528" } ] } }, "response": [ { "name": "Get number of sent push messages", "originalRequest": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json", "disabled": true } ], "url": { "raw": "https://api.line.me/v2/bot/message/delivery/push?date=20210528", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "delivery", "push" ], "query": [ { "key": "date", "value": "20210528" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "x-line-request-id", "value": "6856c0c0-f64c-452e-8f03-ec0664b7cd36" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Content-Length", "value": "30" }, { "key": "Expires", "value": "Sat, 29 May 2021 08:01:25 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Sat, 29 May 2021 08:01:25 GMT" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"status\": \"ready\",\n \"success\": 0\n}" } ] }, { "name": "Get number of sent broadcast messages", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/v2/bot/message/delivery/broadcast?date=20191231", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "delivery", "broadcast" ], "query": [ { "key": "date", "value": "20191231" } ] } }, "response": [ { "name": "Get number of sent broadcast messages", "originalRequest": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json", "disabled": true } ], "url": { "raw": "https://api.line.me/v2/bot/message/delivery/broadcast?date=20191231", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "delivery", "broadcast" ], "query": [ { "key": "date", "value": "20191231" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "x-line-request-id", "value": "7bf9c620-7c1a-4e16-b009-b586fc761cb9" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Expires", "value": "Sat, 29 May 2021 08:01:42 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Sat, 29 May 2021 08:01:42 GMT" }, { "key": "Content-Length", "value": "49" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"status\": \"ready\",\n \"success\": 0\n}" } ] }, { "name": "Get number of sent multicast messages", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json", "disabled": true } ], "url": { "raw": "https://api.line.me/v2/bot/message/delivery/multicast?date=20191231", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "delivery", "multicast" ], "query": [ { "key": "date", "value": "20191231" } ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Message Send", "item": [ { "name": "Flex Message", "item": [ { "name": "Carousel", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"to\": \"{{userid}}\",\r\n \"messages\": [\r\n {\r\n \"type\": \"flex\",\r\n \"altText\": \"This is a Flex Message\",\r\n \"contents\": {\r\n \"type\": \"carousel\",\r\n \"contents\": [\r\n {\r\n \"type\": \"bubble\",\r\n \"body\": {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\",\r\n \"wrap\": true\r\n }\r\n ]\r\n },\r\n \"footer\": {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"button\",\r\n \"style\": \"primary\",\r\n \"action\": {\r\n \"type\": \"uri\",\r\n \"label\": \"Go\",\r\n \"uri\": \"https://example.com\"\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"bubble\",\r\n \"body\": {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"Hello, World!\",\r\n \"wrap\": true\r\n }\r\n ]\r\n },\r\n \"footer\": {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"button\",\r\n \"style\": \"primary\",\r\n \"action\": {\r\n \"type\": \"uri\",\r\n \"label\": \"Go\",\r\n \"uri\": \"https://example.com\"\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/push", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "push" ] } }, "response": [] }, { "name": "Bubble", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"to\": \"{{userid}}\",\r\n \"messages\": [\r\n {\r\n \"type\": \"bubble\",\r\n \"size\": \"giga\",\r\n \"header\": {\r\n \"type\": \"box\",\r\n \"layout\": \"vertical\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"Thai Delight Restaurant\",\r\n \"weight\": \"bold\",\r\n \"size\": \"xl\"\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"123 Bangkok St, Bangkok, Thailand\",\r\n \"size\": \"sm\",\r\n \"color\": \"#aaaaaa\"\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"Tel: +66 2 123 4567\",\r\n \"size\": \"sm\",\r\n \"color\": \"#aaaaaa\"\r\n }\r\n ]\r\n },\r\n \"body\": {\r\n \"type\": \"box\",\r\n \"layout\": \"vertical\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"Food Bill\",\r\n \"weight\": \"bold\",\r\n \"size\": \"xl\"\r\n },\r\n {\r\n \"type\": \"separator\",\r\n \"margin\": \"md\"\r\n },\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"vertical\",\r\n \"margin\": \"lg\",\r\n \"spacing\": \"sm\",\r\n \"contents\": [\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"1. Fried Rice (2 plates)\",\r\n \"size\": \"sm\",\r\n \"color\": \"#555555\",\r\n \"flex\": 0\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"$10.00\",\r\n \"size\": \"sm\",\r\n \"color\": \"#111111\",\r\n \"align\": \"end\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"2. Pad Thai (1 plate)\",\r\n \"size\": \"sm\",\r\n \"color\": \"#555555\",\r\n \"flex\": 0\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"$6.00\",\r\n \"size\": \"sm\",\r\n \"color\": \"#111111\",\r\n \"align\": \"end\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"3. Tom Yum Soup (1 bowl)\",\r\n \"size\": \"sm\",\r\n \"color\": \"#555555\",\r\n \"flex\": 0\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"$7.00\",\r\n \"size\": \"sm\",\r\n \"color\": \"#111111\",\r\n \"align\": \"end\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"4. Green Curry (1 bowl)\",\r\n \"size\": \"sm\",\r\n \"color\": \"#555555\",\r\n \"flex\": 0\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"$8.00\",\r\n \"size\": \"sm\",\r\n \"color\": \"#111111\",\r\n \"align\": \"end\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"5. Spring Rolls (3 pcs)\",\r\n \"size\": \"sm\",\r\n \"color\": \"#555555\",\r\n \"flex\": 0\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"$4.00\",\r\n \"size\": \"sm\",\r\n \"color\": \"#111111\",\r\n \"align\": \"end\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"6. Papaya Salad (1 plate)\",\r\n \"size\": \"sm\",\r\n \"color\": \"#555555\",\r\n \"flex\": 0\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"$5.50\",\r\n \"size\": \"sm\",\r\n \"color\": \"#111111\",\r\n \"align\": \"end\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"7. Sticky Rice (1 bowl)\",\r\n \"size\": \"sm\",\r\n \"color\": \"#555555\",\r\n \"flex\": 0\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"$3.00\",\r\n \"size\": \"sm\",\r\n \"color\": \"#111111\",\r\n \"align\": \"end\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"8. Mango with Sticky Rice (1 plate)\",\r\n \"size\": \"sm\",\r\n \"color\": \"#555555\",\r\n \"flex\": 0\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"$6.50\",\r\n \"size\": \"sm\",\r\n \"color\": \"#111111\",\r\n \"align\": \"end\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"9. Thai Iced Tea (1 glass)\",\r\n \"size\": \"sm\",\r\n \"color\": \"#555555\",\r\n \"flex\": 0\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"$3.50\",\r\n \"size\": \"sm\",\r\n \"color\": \"#111111\",\r\n \"align\": \"end\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"10. Coconut Water (1 glass)\",\r\n \"size\": \"sm\",\r\n \"color\": \"#555555\",\r\n \"flex\": 0\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"$4.50\",\r\n \"size\": \"sm\",\r\n \"color\": \"#111111\",\r\n \"align\": \"end\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"separator\",\r\n \"margin\": \"lg\"\r\n },\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"margin\": \"lg\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"Subtotal\",\r\n \"size\": \"md\",\r\n \"color\": \"#555555\"\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"$53.00\",\r\n \"size\": \"md\",\r\n \"color\": \"#111111\",\r\n \"align\": \"end\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"Service Charge (10%)\",\r\n \"size\": \"md\",\r\n \"color\": \"#555555\"\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"$5.30\",\r\n \"size\": \"md\",\r\n \"color\": \"#111111\",\r\n \"align\": \"end\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"separator\",\r\n \"margin\": \"lg\"\r\n },\r\n {\r\n \"type\": \"box\",\r\n \"layout\": \"horizontal\",\r\n \"margin\": \"lg\",\r\n \"contents\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"Total\",\r\n \"size\": \"md\",\r\n \"weight\": \"bold\"\r\n },\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"$58.30\",\r\n \"size\": \"md\",\r\n \"color\": \"#111111\",\r\n \"align\": \"end\",\r\n \"weight\": \"bold\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/push", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "push" ] } }, "response": [] } ] }, { "name": "Quick Reply Message", "item": [ { "name": "Send Quick reply", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"to\": \"{{userid}}\",\r\n \"messages\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"Select your favorite food category or send me your location!\",\r\n \"quickReply\": {\r\n \"items\": [\r\n {\r\n \"type\": \"action\",\r\n \"imageUrl\": \"https://example.com/sushi.png\",\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"label\": \"Sushi\",\r\n \"text\": \"Sushi\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"imageUrl\": \"https://example.com/sushi.png\",\r\n \"action\": {\r\n \"type\": \"postback\",\r\n \"label\": \"postback\",\r\n \"data\": \"action=buy&itemid=111\",\r\n \"text\": \"Buy\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"action\": {\r\n \"type\": \"camera\",\r\n \"label\": \"Camera\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"action\": {\r\n \"type\": \"cameraRoll\",\r\n \"label\": \"cameraRoll\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"action\": {\r\n \"type\": \"location\",\r\n \"label\": \"Send location\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"action\": {\r\n \"type\": \"uri\",\r\n \"label\": \"Phone order\",\r\n \"uri\": \"tel:00000000\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"action\": {\r\n \"type\": \"uri\",\r\n \"label\": \"Recommend to friends\",\r\n \"uri\": \"https://line.me/R/nv/recommendOA/@linedevelopers\"\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/push", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "push" ] } }, "response": [] } ] }, { "name": "Validate message objects", "item": [ { "name": "Reply message", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"messages\": [\n {\n \"type\": \"text\",\n \"text\": \"Hello, world\"\n },\n {\n \"type\": \"sticker\",\n \"packageId\": \"446\",\n \"stickerId\": \"1988\"\n }\n ]\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/validate/reply", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "validate", "reply" ] } }, "response": [] }, { "name": "Push message", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"messages\": [\n {\n \"type\": \"text\",\n \"text\": \"Hello, world\"\n }\n ]\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/validate/push", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "validate", "push" ] } }, "response": [] }, { "name": "Multicast message", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"messages\": [\n {\n \"type\": \"text\",\n \"text\": \"Hello\"\n }\n ]\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/validate/multicast", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "validate", "multicast" ] } }, "response": [] }, { "name": "Narrowcast message", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"messages\": [\n {\n \"type\": \"text\",\n \"text\": \"Hello\"\n }\n ]\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/validate/narrowcast", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "validate", "narrowcast" ] } }, "response": [] }, { "name": "Broadcast message", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"messages\": [\n {\n \"type\": \"text\",\n \"text\": \"Hello\"\n }\n ]\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/validate/broadcast", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "validate", "broadcast" ] } }, "response": [] } ] }, { "name": "Send broadcast message", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"messages\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"Hello, world\"\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/broadcast", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "broadcast" ] }, "description": "60 requests per hour" }, "response": [] }, { "name": "Send push message", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"to\": \"{{userid}}\",\r\n \"messages\": [\r\n {\r\n \"type\": \"imagemap\",\r\n \"baseUrl\": \"https://firebasestorage.googleapis.com/v0/b/line-chatbot-workshop.firebasestorage.app/o/imagemap.jpg?alt=media&w=auto\",\r\n \"altText\": \"test\",\r\n \"baseSize\": {\r\n \"width\": 1040,\r\n \"height\": 1040\r\n },\r\n \"actions\": [\r\n {\r\n \"type\": \"message\",\r\n \"area\": {\r\n \"x\": 108,\r\n \"y\": 81,\r\n \"width\": 237,\r\n \"height\": 226\r\n },\r\n \"text\": \"1\"\r\n },\r\n {\r\n \"type\": \"message\",\r\n \"area\": {\r\n \"x\": 813,\r\n \"y\": 79,\r\n \"width\": 169,\r\n \"height\": 158\r\n },\r\n \"text\": \"2\"\r\n },\r\n {\r\n \"type\": \"message\",\r\n \"area\": {\r\n \"x\": 444,\r\n \"y\": 892,\r\n \"width\": 152,\r\n \"height\": 134\r\n },\r\n \"text\": \"3\"\r\n }\r\n ]\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/push", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "push" ] } }, "response": [] }, { "name": "Send Push Message (Aggregation unit)", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"to\": \"{{userid}}\",\n \"messages\":[\n {\n \"type\": \"text\",\n \"text\": \"Hello, world1\"\n }\n ],\n \"customAggregationUnits\": [\n \"promotion_a\"\n ]\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/push", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "push" ] } }, "response": [] }, { "name": "Send reply message", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"replyToken\": \"{{replyToken}}\",\r\n \"messages\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"Hello, world1\"\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/reply", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "reply" ], "query": [ { "key": "Authorization", "value": "Bearer Access Token", "disabled": true } ] } }, "response": [] }, { "name": "Send Multicast message", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"to\": [\"{{userid}},{{userid2}}\"],\r\n \"messages\":[\r\n {\r\n \"type\":\"text\",\r\n \"text\":\"multicast\"\r\n },\r\n {\r\n \"type\":\"text\",\r\n \"text\":\"Hello, world2\"\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/multicast", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "multicast" ] }, "description": "60 requests per hour" }, "response": [] }, { "name": "Send narrowcast message", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"messages\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"test message\"\r\n }\r\n ],\r\n \"recipient\": {\r\n \"type\": \"operator\",\r\n \"and\": [\r\n {\r\n \"type\": \"audience\",\r\n \"audienceGroupId\": {{audienceGroupId}}\r\n }\r\n ]\r\n }\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/narrowcast", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "narrowcast" ] } }, "response": [] }, { "name": "Retrying an API request", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "X-Line-Retry-Key", "value": "{{UUID}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"messages\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"test message\"\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/push", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "push" ] } }, "response": [] }, { "name": "Display a loading animation", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"chatId\": \"{{userid}}\",\n \"loadingSeconds\": 5\n}" }, "url": { "raw": "https://api.line.me/v2/bot/chat/loading/start", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "chat", "loading", "start" ] }, "description": "Display a loading animation in one-on-one chats between users and LINE Official Accounts." }, "response": [] }, { "name": "Mark messages as read", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"chatId\": \"{{userid}}\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/chat/markAsRead", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "chat", "markAsRead" ] }, "description": "Mark messages from users as read. This API requires the markAsReadMode of the channel to be set to manual." }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ] }, { "name": "Users", "item": [ { "name": "verified or premium", "item": [ { "name": "Get a list of users who added your LINE Official Account as a friend (verified or premium accounts)", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json", "disabled": true } ], "url": { "raw": "https://api.line.me/v2/bot/profile/{{userid}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "profile", "{{userid}}" ] } }, "response": [] } ] }, { "name": "Get Profile", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json", "disabled": true } ], "url": { "raw": "https://api.line.me/v2/bot/profile/{{userid}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "profile", "{{userid}}" ] } }, "response": [] } ] }, { "name": "Bot", "item": [ { "name": "Get bot info", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json", "disabled": true } ], "url": { "raw": "https://api.line.me/v2/bot/info", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "info" ] } }, "response": [ { "name": "Get bot info", "originalRequest": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json", "disabled": true } ], "url": { "raw": "https://api.line.me/v2/bot/info", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "info" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "x-line-request-id", "value": "9d7fa1ba-8328-43ef-8f2a-d94eaa38be5d" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Content-Length", "value": "261" }, { "key": "Expires", "value": "Tue, 01 Jun 2021 14:46:21 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Tue, 01 Jun 2021 14:46:21 GMT" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"userId\": \"U38fa45fe626e225614b3aec24b2f24b2\",\n \"basicId\": \"@042bjiva\",\n \"displayName\": \"To The Moon\",\n \"pictureUrl\": \"https://profile.line-scdn.net/0h9JwpQ6ZvZmVKCXCldIkZMnZMaAg9J2AtMmorVzpbMVNkaXRnIWd5AG4IbVZuOCc0dzh-B2dZOlQ0\",\n \"chatMode\": \"bot\",\n \"markAsReadMode\": \"auto\"\n}" } ] } ] }, { "name": "membership", "item": [ { "name": "Get a user's membership subscription status", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/membership/v1/subscription/{{userId}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "membership", "v1", "subscription", "{{userId}}" ] } }, "response": [] }, { "name": "Get membership plans being offered", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/v2/bot/membership/list", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "membership", "list" ] } }, "response": [] }, { "name": "Get a list of users who have joined the membership", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "limit", "value": "{{limit}}", "type": "text" }, { "key": "start", "value": "{{start}}", "type": "text" } ] }, "url": { "raw": "https://api.line.me/v2/bot/membership/{{membershipId}}/users/ids?limit={{limit}}&start={{start}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "membership", "{{membershipId}}", "users", "ids" ], "query": [ { "key": "limit", "value": "{{limit}}" }, { "key": "start", "value": "{{start}}" } ] } }, "response": [] } ], "description": "# Use membership features\n\n[Membership (opens new window)](https://www.lycbiz.com/jp/service/line-official-account/Membership/)(only available in Japanese) is a monthly membership subscription feature available for the LINE Official Account. Users can subscribe to the membership plan on your LINE Official Account to receive exclusive member perks.\n\n## [#](https://developers.line.biz/en/docs/messaging-api/use-membership-features/#endpoints)Endpoint for getting membership information\n\nWith the Messaging API, you can get membership information with the following endpoints:\n\n- [Get a user's membership subscription status](https://developers.line.biz/en/docs/messaging-api/use-membership-features/#get-a-users-membership-subscription-status)\n \n- [Get a list of users who have joined the membership](https://developers.line.biz/en/docs/messaging-api/use-membership-features/#get-membership-user-ids)\n \n- [Get membership plans being offered](https://developers.line.biz/en/docs/messaging-api/use-membership-features/#get-membership-plans)\n \n\n How to start a membership\n\nYou can set up and publish your membership on the [LINE Official Account Manager (opens new window)](https://manager.line.biz/). For more information, see [You can easily create subscription services on LINE! What is the \"Membership\" feature of the LINE Official Account? (opens new window)](https://www.lycbiz.com/jp/column/line-official-account/service-information/membership/)(only available in Japanese) in LINE for Business.\n\nCurrently, the membership feature is only available for LINE Official Accounts in Japan.\n\n### [#](https://developers.line.biz/en/docs/messaging-api/use-membership-features/#get-a-users-membership-subscription-status)Get a user's membership subscription status\n\nThis endpoint allows you to get information about the memberships to which the user specified by the user ID is subscribed. For more information, see [Get a user's membership subscription status](https://developers.line.biz/en/reference/messaging-api/#get-a-users-membership-subscription-status) in the Messaging API reference.\n\n### [#](https://developers.line.biz/en/docs/messaging-api/use-membership-features/#get-membership-user-ids)Get a list of users who have joined the membership\n\nThis endpoint allows you to get a list of user IDs for users who have joined the membership of your LINE Official Account. For more information, see [Get a list of users who have joined the membership](https://developers.line.biz/en/reference/messaging-api/#get-membership-user-ids) in the Messaging API reference.\n\n### [#](https://developers.line.biz/en/docs/messaging-api/use-membership-features/#get-membership-plans)Get membership plans being offered\n\nThis endpoint allows you to get the membership plans that are currently being offered through your LINE Official Account membership. For more information, see [Get membership plans being offered](https://developers.line.biz/en/reference/messaging-api/#get-membership-plans) in the Messaging API reference.\n\n## [#](https://developers.line.biz/en/docs/messaging-api/use-membership-features/#membership-event)Webhook membership event\n\nWhen a user joins, renews, or leaves a membership of your LINE Official Account, a webhook membership event is sent. For more information, see [Membership event](https://developers.line.biz/en/reference/messaging-api/#membership-event) in the Messaging API reference." }, { "name": "Group Chat", "item": [ { "name": "verified or premium", "item": [ { "name": "Get group member user IDs", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/group/{{userid}}/members/ids", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "group", "{{userid}}", "members", "ids" ] } }, "response": [] } ] }, { "name": "Get group summary", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/group/{groupId}/summary", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "group", "{groupId}", "summary" ] } }, "response": [] }, { "name": "Get number of users in a group", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/group/{groupId}/members/count", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "group", "{groupId}", "members", "count" ] } }, "response": [] }, { "name": "Get group member profile", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/group/{groupId}/member/{{userid}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "group", "{groupId}", "member", "{{userid}}" ] } }, "response": [] }, { "name": "Leave group", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/group/{{groupId}}/leave", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "group", "{{groupId}}", "leave" ] } }, "response": [] } ] }, { "name": "Room", "item": [ { "name": "verified or premium", "item": [ { "name": "Get room member user IDs", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/room/{roomId}/members/ids", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "room", "{roomId}", "members", "ids" ] } }, "response": [] } ] }, { "name": "Get number of users in a room", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/room/{roomId}/members/count", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "room", "{roomId}", "members", "count" ] } }, "response": [] }, { "name": "Get room member profile", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/room/{{roomId}}/member/{{userid}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "room", "{{roomId}}", "member", "{{userid}}" ] } }, "response": [] }, { "name": "Leave room", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/room/{{roomId}}/leave", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "room", "{{roomId}}", "leave" ] } }, "response": [] } ] }, { "name": "Insight", "item": [ { "name": "Get number of message deliveries", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json", "disabled": true } ], "url": { "raw": "https://api.line.me/v2/bot/insight/message/delivery?date=20210529", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "insight", "message", "delivery" ], "query": [ { "key": "date", "value": "20210529" } ] } }, "response": [ { "name": "Get number of message deliveries", "originalRequest": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json", "disabled": true } ], "url": { "raw": "https://api.line.me/v2/bot/insight/message/delivery?date=20210529", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "insight", "message", "delivery" ], "query": [ { "key": "date", "value": "20210529" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "x-line-request-id", "value": "317ce853-c938-4875-a4ad-5c8a3646131d" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Expires", "value": "Sun, 30 May 2021 04:13:08 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Sun, 30 May 2021 04:13:08 GMT" }, { "key": "Content-Length", "value": "87" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"status\": \"ready\",\n \"apiBroadcast\": 1,\n \"apiPush\": 1,\n \"apiMulticast\": 2,\n \"apiReply\": 3\n}" } ] }, { "name": "Get number of followers", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/insight/followers?date=20230715", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "insight", "followers" ], "query": [ { "key": "date", "value": "20230715", "description": "Format: yyyyMMdd (Example: 20191231)" } ] } }, "response": [ { "name": "Get number of followers", "originalRequest": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/insight/followers?date=20210529", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "insight", "followers" ], "query": [ { "key": "date", "value": "20210529" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "x-line-request-id", "value": "52b374b7-514f-49b9-90b9-40655c2f506a" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Expires", "value": "Sat, 29 May 2021 07:46:16 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Sat, 29 May 2021 07:46:16 GMT" }, { "key": "Content-Length", "value": "94" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"status\": \"ready\",\n \"followers\": 11929,\n \"targetedReaches\": 11101,\n \"blocks\": 612\n}" } ] }, { "name": "Get friend demographics", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/insight/demographic", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "insight", "demographic" ] } }, "response": [ { "name": "Get friend demographics", "originalRequest": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/insight/demographic", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "insight", "demographic" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "x-line-request-id", "value": "3f8fcd8e-d3b4-4b03-a6c6-b0ce7a2559d7" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Expires", "value": "Sat, 29 May 2021 07:44:37 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Sat, 29 May 2021 07:44:37 GMT" }, { "key": "Content-Length", "value": "430" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"available\": true,\n \"genders\": [\n {\n \"gender\": \"female\",\n \"percentage\": 69.9\n },\n {\n \"gender\": \"male\",\n \"percentage\": 29.4\n },\n {\n \"gender\": \"unknown\",\n \"percentage\": 0.7\n }\n ],\n \"ages\": [\n {\n \"age\": \"from20to24\",\n \"percentage\": 45.1\n },\n {\n \"age\": \"from15to19\",\n \"percentage\": 19\n },\n {\n \"age\": \"from25to29\",\n \"percentage\": 10.8\n },\n {\n \"age\": \"from30to34\",\n \"percentage\": 9.1\n },\n {\n \"age\": \"from35to39\",\n \"percentage\": 6.6\n },\n {\n \"age\": \"from40to44\",\n \"percentage\": 3.4\n },\n {\n \"age\": \"from50\",\n \"percentage\": 2.7\n },\n {\n \"age\": \"from45to49\",\n \"percentage\": 2.5\n },\n {\n \"age\": \"unknown\",\n \"percentage\": 0.7\n },\n {\n \"age\": \"from0to14\",\n \"percentage\": 0\n }\n ],\n \"areas\": [\n {\n \"area\": \"Bangkok\",\n \"percentage\": 80\n },\n {\n \"area\": \"Central\",\n \"percentage\": 6.2\n },\n {\n \"area\": \"Northern\",\n \"percentage\": 3.8\n },\n {\n \"area\": \"Southern\",\n \"percentage\": 3.4\n },\n {\n \"area\": \"NorthEastern\",\n \"percentage\": 3.1\n },\n {\n \"area\": \"Eastern\",\n \"percentage\": 2.1\n },\n {\n \"area\": \"unknown\",\n \"percentage\": 1.1\n },\n {\n \"area\": \"Western\",\n \"percentage\": 0.4\n },\n {\n \"area\": \"Pattaya\",\n \"percentage\": 0\n }\n ],\n \"appTypes\": [\n {\n \"appType\": \"ios\",\n \"percentage\": 65.3\n },\n {\n \"appType\": \"android\",\n \"percentage\": 34.7\n },\n {\n \"appType\": \"others\",\n \"percentage\": 0\n }\n ],\n \"subscriptionPeriods\": [\n {\n \"subscriptionPeriod\": \"over365days\",\n \"percentage\": 49.6\n },\n {\n \"subscriptionPeriod\": \"within365days\",\n \"percentage\": 26.8\n },\n {\n \"subscriptionPeriod\": \"within180days\",\n \"percentage\": 16.7\n },\n {\n \"subscriptionPeriod\": \"within90days\",\n \"percentage\": 4.6\n },\n {\n \"subscriptionPeriod\": \"within30days\",\n \"percentage\": 2\n },\n {\n \"subscriptionPeriod\": \"within7days\",\n \"percentage\": 0.4\n }\n ]\n}" } ] }, { "name": "Get user interaction statistics", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/v2/bot/insight/message/event?requestId=f70dd685-499a-4231-a441-f24b8d4fba21", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "insight", "message", "event" ], "query": [ { "key": "requestId", "value": "f70dd685-499a-4231-a441-f24b8d4fba21" } ] } }, "response": [] } ] }, { "name": "Webhook Setting", "item": [ { "name": "New Request", "request": { "method": "PUT", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"endpoint\": \"{{webhook_endpoint}}\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/channel/webhook/endpoint", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "channel", "webhook", "endpoint" ] } }, "response": [ { "name": "New Request", "originalRequest": { "method": "PUT", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"endpoint\": \"https://aa65b537f51d.ngrok.io/line-cryptocurrency/asia-northeast1/Chatbot\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/channel/webhook/endpoint", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "channel", "webhook", "endpoint" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "x-line-request-id", "value": "496bb8b3-e2e3-448e-9187-eee8438dc147" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Expires", "value": "Sat, 29 May 2021 09:22:38 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Sat, 29 May 2021 09:22:38 GMT" }, { "key": "Content-Length", "value": "22" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{}" } ] }, { "name": "Get webhook endpoint information", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "file", "file": { "src": "" } }, "url": { "raw": "https://api.line.me/v2/bot/channel/webhook/endpoint", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "channel", "webhook", "endpoint" ] } }, "response": [ { "name": "Get webhook endpoint information", "originalRequest": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/channel/webhook/endpoint", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "channel", "webhook", "endpoint" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "x-line-request-id", "value": "bbbcd629-87ad-45e7-a1b7-7aaf897e2165" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Content-Length", "value": "102" }, { "key": "Expires", "value": "Sat, 29 May 2021 09:18:50 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Sat, 29 May 2021 09:18:50 GMT" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"endpoint\": \"https://aa65b537f51d.ngrok.io/line-cryptocurrency/asia-northeast1/Chatbot\",\n \"active\": true\n}" } ] }, { "name": "Test webhook endpoint", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"endpoint\": \"{{webhook_endpoint}}\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/channel/webhook/test", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "channel", "webhook", "test" ] } }, "response": [ { "name": "Test webhook endpoint", "originalRequest": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"endpoint\": \"https://aa65b537f51d.ngrok.io/line-cryptocurrency/asia-northeast1/Chatbot\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/channel/webhook/test", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "channel", "webhook", "test" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "x-line-request-id", "value": "7f27f0ce-ecb6-4ec9-9cd1-ed3671f9c9fb" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Expires", "value": "Sat, 29 May 2021 09:20:55 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Sat, 29 May 2021 09:20:55 GMT" }, { "key": "Content-Length", "value": "131" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"success\": false,\n \"timestamp\": \"2021-05-29T09:20:55.364610Z\",\n \"statusCode\": 500,\n \"reason\": \"ERROR_STATUS_CODE\",\n \"detail\": \"500\"\n}" } ] } ] }, { "name": "Richmenu", "item": [ { "name": "Set Richmenu", "item": [ { "name": "Batch", "item": [ { "name": "Replace or unlink (Batch 3 req/hour)", "item": [ { "name": "Replace", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"operations\": [\n {\n \"type\": \"link\",\n \"from\": \"{{richmenuId_a}}\",\n \"to\": \"{{richmenuId_b}}\"\n }\n ],\n \"resumeRequestKey\": \"{{$guid}}\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/richmenu/batch", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "batch" ] } }, "response": [] }, { "name": "Unlink", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"operations\": [\n {\n \"type\": \"link\",\n \"from\": \"{{richmenuId_a}}\",\n \"to\": \"{{richmenuId_b}}\"\n }\n ],\n \"resumeRequestKey\": \"{{$guid}}\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/richmenu/batch", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "batch" ] } }, "response": [] }, { "name": "Unlink All", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"operations\": [\n {\n \"type\": \"unlinkAll\"\n }\n ],\n \"resumeRequestKey\": \"{{$guid}}\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/richmenu/batch", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "batch" ] } }, "response": [] } ], "description": "[https://developers.line.biz/en/reference/messaging-api/#batch-control-rich-menus-of-users]()" }, { "name": "Get the status of rich menu batch control", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/v2/bot/richmenu/progress/batch?requestId={{request_id}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "progress", "batch" ], "query": [ { "key": "requestId", "value": "{{request_id}}", "description": "A request ID used to batch control the rich menu linked to the user. Each Messaging API request has a request ID. Find it in the response headers." } ] } }, "response": [] }, { "name": "Validate a request of rich menu batch control", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {channel access token}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"operations\": [\n {\n \"type\": \"link\",\n \"from\": \"{{richmenuId_a}}\",\n \"to\": \"{{richmenuId_b}}\"\n }\n ],\n \"resumeRequestKey\": \"{{$guid}}\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/richmenu/validate/batch", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "validate", "batch" ] } }, "response": [] } ] }, { "name": "Create a rich menu", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"richMenuId\", jsonData.richMenuId);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"size\": {\r\n \"width\": 2500,\r\n \"height\": 1686\r\n },\r\n \"selected\": false,\r\n \"name\": \"Nice richmenu\",\r\n \"chatBarText\": \"Tap here\",\r\n \"areas\": [\r\n {\r\n \"bounds\": {\r\n \"x\": 0,\r\n \"y\": 0,\r\n \"width\": 2500,\r\n \"height\": 1686\r\n },\r\n \"action\": {\r\n \"type\": \"postback\",\r\n \"data\": \"action=buy&itemid=123\"\r\n }\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/richmenu", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu" ] } }, "response": [] }, { "name": "Validate rich menu object", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"size\": {\n \"width\": 2500,\n \"height\": 1686\n },\n \"selected\": false,\n \"name\": \"Nice richmenu\",\n \"chatBarText\": \"Tap here\",\n \"areas\": [\n {\n \"bounds\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 2500,\n \"height\": 1686\n },\n \"action\": {\n \"type\": \"postback\",\n \"data\": \"action=buy&itemid=123\"\n }\n }\n ]\n}" }, "url": { "raw": "https://api.line.me/v2/bot/richmenu/validate", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "validate" ] } }, "response": [] }, { "name": "Upload the rich menu image", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "image/jpeg", "type": "text" } ], "body": { "mode": "file", "file": { "src": "" } }, "url": { "raw": "https://api-data.line.me/v2/bot/richmenu/{{richMenuId}}/content", "protocol": "https", "host": [ "api-data", "line", "me" ], "path": [ "v2", "bot", "richmenu", "{{richMenuId}}", "content" ] }, "description": "Image format: JPEG or PNG\r\nImage size (pixels): 2500x1686, 2500x843, 1200x810, 1200x405, 800x540, 800x270\r\nMaximum file size: 1 MB" }, "response": [] }, { "name": "Set the default rich menu", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://api.line.me/v2/bot/user/all/richmenu/{{richMenuId}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "user", "all", "richmenu", "{{richMenuId}}" ] } }, "response": [] }, { "name": "Link a rich menu to an individual user", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://api.line.me/v2/bot/user/{{userid}}/richmenu/{{richMenuId}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "user", "{{userid}}", "richmenu", "{{richMenuId}}" ] } }, "response": [] }, { "name": "Link a rich menu to multiple users", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"richMenuId\": \"{{richMenuId}}\",\r\n \"userIds\": [\r\n \"Ua9980474ba3035aace9b67fc001176ac\",\r\n \"U8d4922ec49aad8fa19a6ebeff30dc41e\",\r\n \"Ue858917ffd40b79694033344f04dcf5a\",\r\n \"U49b18c760f3a022cff5ecef7c693648e\",\r\n \"Ub3ecb6b608b8bcc41f40a03237347c53\",\r\n \"U42bef9cdf599def8e8fb97a9cf3a7380\",\r\n \"Ue0c4634717a0e011e4577cfbd21dea34\",\r\n \"U8e8a957c9ca782d0b183c29e0cf1e1d9\",\r\n \"Ud73bc4eb54356cf1807e30a041ace614\",\r\n \"Ue16ebe663de49378194f106a684d08b1\",\r\n \"U3ef3eb24acbc776018198bfaf9f5a78b\",\r\n \"U255894952969e7b92fc06009797e6c5e\",\r\n \"Ua0d3ad60a123a4bdd01f2dd4d27fb16a\",\r\n \"Ue842ae1c3bcf288646f1bcbe42df9456\",\r\n \"Ud06bff529511cfb66da44840b3454d8a\",\r\n \"U0e8c0b83346e4a34916385864e9c12d3\"\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://api.line.me/v2/bot/richmenu/bulk/link", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "bulk", "link" ] } }, "response": [] } ], "description": "เริ่มต้นการใช้งาน Richmenu", "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Set Richmenu Switch Action", "item": [ { "name": "[1]Create a rich menu A", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"richMenuId_A\", jsonData.richMenuId);" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"size\": {\r\n \"width\": 2500,\r\n \"height\": 1686\r\n },\r\n \"selected\": true,\r\n \"name\": \"Staff\",\r\n \"chatBarText\": \"Click\",\r\n \"areas\": [\r\n {\r\n \"bounds\": {\r\n \"x\": 1210,\r\n \"y\": 259,\r\n \"width\": 1193,\r\n \"height\": 610\r\n },\r\n \"action\": {\r\n \"type\": \"uri\",\r\n \"uri\": \"https://liff.line.me/xxxxx\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 1222,\r\n \"y\": 1082,\r\n \"width\": 1198,\r\n \"height\": 468\r\n },\r\n \"action\": {\r\n \"type\": \"uri\",\r\n \"uri\": \"https://liff.line.me/xxxx\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 75,\r\n \"y\": 262,\r\n \"width\": 938,\r\n \"height\": 1351\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"ข้อมูลโครงการ\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 1998,\r\n \"y\": 38,\r\n \"width\": 468,\r\n \"height\": 131\r\n },\r\n \"action\": {\r\n \"type\": \"richmenuswitch\",\r\n \"richMenuAliasId\": \"richmenu-c\",\r\n \"data\": \"richmenu=c\"\r\n }\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/richmenu", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu" ] } }, "response": [] }, { "name": "[2]Create a rich menu B", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"richMenuId_B\", jsonData.richMenuId);" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"size\": {\r\n \"width\": 2500,\r\n \"height\": 1686\r\n },\r\n \"selected\": true,\r\n \"name\": \"Manager\",\r\n \"chatBarText\": \"Click\",\r\n \"areas\": [\r\n {\r\n \"bounds\": {\r\n \"x\": 1210,\r\n \"y\": 259,\r\n \"width\": 1193,\r\n \"height\": 610\r\n },\r\n \"action\": {\r\n \"type\": \"uri\",\r\n \"uri\": \"https://liff.line.me/xxxx\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 1850,\r\n \"y\": 1437,\r\n \"width\": 503,\r\n \"height\": 187\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"ข้อมูลรายงาน\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 1160,\r\n \"y\": 955,\r\n \"width\": 564,\r\n \"height\": 679\r\n },\r\n \"action\": {\r\n \"type\": \"uri\",\r\n \"uri\": \"https://liff.line.me/xxxx\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 1785,\r\n \"y\": 955,\r\n \"width\": 632,\r\n \"height\": 672\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"ข้อมูลรายงาน\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 75,\r\n \"y\": 262,\r\n \"width\": 938,\r\n \"height\": 1351\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"ข้อมูลโครงการ\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 1959,\r\n \"y\": 24,\r\n \"width\": 496,\r\n \"height\": 123\r\n },\r\n \"action\": {\r\n \"type\": \"richmenuswitch\",\r\n \"richMenuAliasId\": \"richmenu-d\",\r\n \"data\": \"richmenu=d\"\r\n }\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/richmenu", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu" ] } }, "response": [] }, { "name": "[3]Create a rich menu C", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"richMenuId_C\", jsonData.richMenuId);" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"size\": {\r\n \"width\": 2500,\r\n \"height\": 1686\r\n },\r\n \"selected\": true,\r\n \"name\": \"Page2-1\",\r\n \"chatBarText\": \"Click\",\r\n \"areas\": [\r\n {\r\n \"bounds\": {\r\n \"x\": 64,\r\n \"y\": 147,\r\n \"width\": 1581,\r\n \"height\": 744\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"xxxx\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 1709,\r\n \"y\": 192,\r\n \"width\": 738,\r\n \"height\": 697\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"ข้อมูลองค์กร\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 81,\r\n \"y\": 985,\r\n \"width\": 752,\r\n \"height\": 643\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"IT Service\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 927,\r\n \"y\": 979,\r\n \"width\": 618,\r\n \"height\": 639\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"IP/IC\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 1662,\r\n \"y\": 953,\r\n \"width\": 716,\r\n \"height\": 669\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"Contact BU\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 2021,\r\n \"y\": 19,\r\n \"width\": 415,\r\n \"height\": 128\r\n },\r\n \"action\": {\r\n \"type\": \"richmenuswitch\",\r\n \"richMenuAliasId\": \"richmenu-a\",\r\n \"data\": \"richmenu=a\"\r\n }\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/richmenu", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu" ] } }, "response": [] }, { "name": "[4]Create a rich menu D", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"richMenuId_D\", jsonData.richMenuId);" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"size\": {\r\n \"width\": 2500,\r\n \"height\": 1686\r\n },\r\n \"selected\": true,\r\n \"name\": \"Page2-2\",\r\n \"chatBarText\": \"Click\",\r\n \"areas\": [\r\n {\r\n \"bounds\": {\r\n \"x\": 64,\r\n \"y\": 147,\r\n \"width\": 1581,\r\n \"height\": 744\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"Calendar\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 1709,\r\n \"y\": 192,\r\n \"width\": 738,\r\n \"height\": 697\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"ข้อมูลองค์กร\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 81,\r\n \"y\": 985,\r\n \"width\": 752,\r\n \"height\": 643\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"IT Service\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 927,\r\n \"y\": 979,\r\n \"width\": 618,\r\n \"height\": 639\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"IP/IC\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 1662,\r\n \"y\": 953,\r\n \"width\": 716,\r\n \"height\": 669\r\n },\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"text\": \"Contact\"\r\n }\r\n },\r\n {\r\n \"bounds\": {\r\n \"x\": 2021,\r\n \"y\": 19,\r\n \"width\": 415,\r\n \"height\": 128\r\n },\r\n \"action\": {\r\n \"type\": \"richmenuswitch\",\r\n \"richMenuAliasId\": \"richmenu-b\",\r\n \"data\": \"richmenu=b\"\r\n }\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/richmenu", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu" ] } }, "response": [] }, { "name": "[5]Upload the rich menu image A", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "image/jpeg", "type": "text" } ], "body": { "mode": "file", "file": { "src": "" } }, "url": { "raw": "https://api-data.line.me/v2/bot/richmenu/{{richMenuId_A}}/content", "protocol": "https", "host": [ "api-data", "line", "me" ], "path": [ "v2", "bot", "richmenu", "{{richMenuId_A}}", "content" ] }, "description": "Image format: JPEG or PNG\r\nImage size (pixels): 2500x1686, 2500x843, 1200x810, 1200x405, 800x540, 800x270\r\nMaximum file size: 1 MB" }, "response": [] }, { "name": "[6]Upload the rich menu image B", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "image/jpeg", "type": "text" } ], "body": { "mode": "file", "file": { "src": "" } }, "url": { "raw": "https://api-data.line.me/v2/bot/richmenu/{{richMenuId_B}}/content", "protocol": "https", "host": [ "api-data", "line", "me" ], "path": [ "v2", "bot", "richmenu", "{{richMenuId_B}}", "content" ] }, "description": "Image format: JPEG or PNG\r\nImage size (pixels): 2500x1686, 2500x843, 1200x810, 1200x405, 800x540, 800x270\r\nMaximum file size: 1 MB" }, "response": [] }, { "name": "[7]Upload the rich menu image C", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "image/jpeg", "type": "text" } ], "body": { "mode": "file", "file": { "src": "" } }, "url": { "raw": "https://api-data.line.me/v2/bot/richmenu/{{richMenuId_C}}/content", "protocol": "https", "host": [ "api-data", "line", "me" ], "path": [ "v2", "bot", "richmenu", "{{richMenuId_C}}", "content" ] }, "description": "Image format: JPEG or PNG\r\nImage size (pixels): 2500x1686, 2500x843, 1200x810, 1200x405, 800x540, 800x270\r\nMaximum file size: 1 MB" }, "response": [] }, { "name": "[8]Upload the rich menu image D", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "image/jpeg", "type": "text" } ], "body": { "mode": "file", "file": { "src": "" } }, "url": { "raw": "https://api-data.line.me/v2/bot/richmenu/{{richMenuId_D}}/content", "protocol": "https", "host": [ "api-data", "line", "me" ], "path": [ "v2", "bot", "richmenu", "{{richMenuId_D}}", "content" ] }, "description": "Image format: JPEG or PNG\r\nImage size (pixels): 2500x1686, 2500x843, 1200x810, 1200x405, 800x540, 800x270\r\nMaximum file size: 1 MB" }, "response": [] }, { "name": "[9]Set the default rich menu A", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://api.line.me/v2/bot/user/all/richmenu/{{richMenuId_A}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "user", "all", "richmenu", "{{richMenuId_A}}" ] } }, "response": [] }, { "name": "[10]Create rich menu alias A", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"richMenuAliasId\": \"richmenu-a\",\r\n \"richMenuId\": \"{{richMenuId_A}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://api.line.me/v2/bot/richmenu/alias", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "alias" ] } }, "response": [] }, { "name": "[11]Create rich menu alias B", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"richMenuAliasId\": \"richmenu-b\",\r\n \"richMenuId\": \"{{richMenuId_B}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://api.line.me/v2/bot/richmenu/alias", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "alias" ] } }, "response": [] }, { "name": "[12]Create rich menu alias C", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"richMenuAliasId\": \"richmenu-c\",\r\n \"richMenuId\": \"{{richMenuId_C}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://api.line.me/v2/bot/richmenu/alias", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "alias" ] } }, "response": [] }, { "name": "[13]Create rich menu alias D", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"richMenuAliasId\": \"richmenu-d\",\r\n \"richMenuId\": \"{{richMenuId_D}}\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://api.line.me/v2/bot/richmenu/alias", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "alias" ] } }, "response": [] } ], "description": "เริ่มต้นการใช้งาน Richmenu", "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "GET", "item": [ { "name": "menu alias (Switch Action)", "item": [ { "name": "Get rich menu alias information", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/v2/bot/richmenu/alias/richmenu-a", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "alias", "richmenu-a" ] } }, "response": [] }, { "name": "Get list of rich menu alias", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/v2/bot/richmenu/alias/list", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "alias", "list" ] } }, "response": [] }, { "name": "Update rich menu alias", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"richMenuId\": \"{{richMenuId}}\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/richmenu/alias/{{richMenuAliasId}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "alias", "{{richMenuAliasId}}" ] }, "description": "Update the rich menu ID associated with a rich menu alias." }, "response": [] } ] }, { "name": "Get a rich menu list", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"richMenuId\", jsonData.richmenus[0].richMenuId);", "", "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", "});" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/richmenu/list", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "list" ] } }, "response": [] }, { "name": "Get a rich menu", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/richmenu/{{richMenuId}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "{{richMenuId}}" ] } }, "response": [] }, { "name": "Get the default rich menu ID", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/user/all/richmenu", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "user", "all", "richmenu" ] } }, "response": [] }, { "name": "Get the rich menu ID linked to a user", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/user/{{userId}}/richmenu", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "user", "{{userId}}", "richmenu" ] } }, "response": [] }, { "name": "Download rich menu image", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "image/jpeg", "type": "text" } ], "body": { "mode": "file", "file": { "src": "" } }, "url": { "raw": "https://api-data.line.me/v2/bot/richmenu/{{richMenuId}}/content", "protocol": "https", "host": [ "api-data", "line", "me" ], "path": [ "v2", "bot", "richmenu", "{{richMenuId}}", "content" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "DELETE", "item": [ { "name": "menu alias (Switch Action)", "item": [ { "name": "Delete rich menu alias", "request": { "method": "DELETE", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/v2/bot/richmenu/alias/richmenu-a", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "alias", "richmenu-a" ] } }, "response": [] } ] }, { "name": "Delete a rich menu", "request": { "method": "DELETE", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/richmenu/{{richMenuId}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "{{richMenuId}}" ] } }, "response": [] }, { "name": "Cancel the default rich menu", "request": { "method": "DELETE", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/user/all/richmenu", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "user", "all", "richmenu" ] } }, "response": [] }, { "name": "Unlink a rich menu from a user", "request": { "method": "DELETE", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://api.line.me/v2/bot/user/{{userid}}/richmenu", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "user", "{{userid}}", "richmenu" ] } }, "response": [] }, { "name": "Unlink rich menus from multiple users", "request": { "method": "DELETE", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"userIds\":[\"{{userid}}\"]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://api.line.me/v2/bot/richmenu/bulk/unlink", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "richmenu", "bulk", "unlink" ] } }, "response": [] } ] } ] }, { "name": "Managing Audience (60 requests per minute)", "item": [ { "name": "Create audience for uploading user IDs (by JSON)", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"audienceId\", jsonData.audienceGroupId);", "pm.globals.set(\"audienceDescription\", jsonData.description);" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"description\": \"audienceGroupName_01_messaging_api\",\n \"uploadDescription\": \"demo audienceGroupName\",\n \"isIfaAudience\": \"false\",\n \"audiences\": [\n {\n \"id\": \"U61198bb44f6c28c97c5818617464ba1d\"\n }\n ],\n \"audiences[].id\": \"user id\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/upload", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "upload" ] } }, "response": [ { "name": "Create audience for uploading user IDs (by JSON)", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"description\": \"audienceGroupName_01\",\n \"uploadDescription\": \"demo audienceGroupName\",\n \"isIfaAudience\": \"false\",\n \"audiences\": [\n {\n \"id\": \"U61198bb44f6c28c97c5818617464ba1d\"\n }\n ],\n \"audiences[].id\": \"user id\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/upload", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "upload" ] } }, "status": "Accepted", "code": 202, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Content-Length", "value": "214" }, { "key": "x-line-request-id", "value": "35f4d28f-ed3f-496e-b284-a4b92262602e" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Expires", "value": "Tue, 01 Jun 2021 14:38:10 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Tue, 01 Jun 2021 14:38:10 GMT" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"audienceGroupId\": 9517397392712,\n \"createRoute\": \"MESSAGING_API\",\n \"type\": \"UPLOAD\",\n \"description\": \"audienceGroupName_01\",\n \"created\": 1622558289,\n \"permission\": \"READ_WRITE\",\n \"expireTimestamp\": 1638110289,\n \"isIfaAudience\": false\n}" } ] }, { "name": "Create audience for uploading user IDs (by file)", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "formdata", "formdata": [ { "key": "description", "value": "audienceGroupName_file", "type": "text" }, { "key": "isIfaAudience", "value": "false", "type": "text" }, { "key": "uploadDescription", "value": "demo upload", "type": "text" }, { "key": "file", "type": "file", "src": "" } ] }, "url": { "raw": "https://api-data.line.me/v2/bot/audienceGroup/upload/byFile", "protocol": "https", "host": [ "api-data", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "upload", "byFile" ] }, "description": "Create an audience for uploading user IDs by file. Max file size: 10 MB. Format: text file with one user ID per line." }, "response": [] }, { "name": "Add user IDs to audience (by JSON)", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"audienceGroupId\": {{audienceId}},\n \"uploadDescription\": \"add more users\",\n \"audiences\": [\n {\n \"id\": \"U4af4980627...\"\n }\n ]\n}" }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/upload", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "upload" ] }, "description": "Add user IDs or IFAs to an existing audience for uploading user IDs." }, "response": [] }, { "name": "Add user IDs to audience (by file)", "request": { "method": "PUT", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "formdata", "formdata": [ { "key": "audienceGroupId", "value": "{{audienceId}}", "type": "text" }, { "key": "uploadDescription", "value": "add more users by file", "type": "text" }, { "key": "file", "type": "file", "src": "" } ] }, "url": { "raw": "https://api-data.line.me/v2/bot/audienceGroup/upload/byFile", "protocol": "https", "host": [ "api-data", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "upload", "byFile" ] }, "description": "Add user IDs or IFAs to an existing audience by file upload." }, "response": [] }, { "name": "Create message click audience", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"description\": \"click_audience_demo\",\n \"requestId\": \"{{request_id}}\",\n \"clickUrl\": \"https://example.com\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/click", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "click" ] }, "description": "Create an audience based on users who clicked a URL in a message sent in the past." }, "response": [] }, { "name": "Create message impression audience", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"description\": \"impression_audience_demo\",\n \"requestId\": \"{{request_id}}\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/imp", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "imp" ] }, "description": "Create an audience based on users who opened a message sent in the past." }, "response": [] }, { "name": "Rename an audience", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"description\": \"audienceGroupName_01_dev2\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/{{audienceId}}/updateDescription", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "{{audienceId}}", "updateDescription" ] } }, "response": [ { "name": "Rename an audience", "originalRequest": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"description\": \"audienceGroupName_01_dev2\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/9517397392712/updateDescription", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "9517397392712", "updateDescription" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Content-Length", "value": "2" }, { "key": "x-line-request-id", "value": "90554552-5289-4fe4-8809-829b1c53f560" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Expires", "value": "Tue, 01 Jun 2021 14:38:29 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Tue, 01 Jun 2021 14:38:29 GMT" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{}" } ] }, { "name": "Get audience data", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/{{audienceId}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "{{audienceId}}" ] } }, "response": [ { "name": "Get audience data", "originalRequest": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/4552910771427", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "4552910771427" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Content-Length", "value": "502" }, { "key": "x-line-request-id", "value": "6d72796e-851e-4a22-862c-d93eb28e2683" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Expires", "value": "Tue, 01 Jun 2021 14:27:38 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Tue, 01 Jun 2021 14:27:38 GMT" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"audienceGroup\": {\n \"audienceGroupId\": 4552910771427,\n \"createRoute\": \"MESSAGING_API\",\n \"type\": \"UPLOAD\",\n \"description\": \"audienceGroupName_01_dev2\",\n \"status\": \"READY\",\n \"audienceCount\": 1,\n \"created\": 1622557376,\n \"permission\": \"READ_WRITE\",\n \"expireTimestamp\": 1638109376,\n \"isIfaAudience\": false\n },\n \"jobs\": [\n {\n \"audienceGroupJobId\": 44885008,\n \"audienceGroupId\": 4552910771427,\n \"description\": \"demo audienceGroupName\",\n \"type\": \"DIFF_ADD\",\n \"status\": \"FINISHED\",\n \"failedType\": null,\n \"audienceCount\": 1,\n \"created\": 1622557376,\n \"jobStatus\": \"FINISHED\"\n }\n ]\n}" } ] }, { "name": "Get data for multiple audiences", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/list", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "list" ] } }, "response": [ { "name": "Get data for multiple audiences", "originalRequest": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/list", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "list" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "x-line-request-id", "value": "22a42119-7a36-4973-8449-e4573935f14e" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Content-Encoding", "value": "gzip" }, { "key": "Expires", "value": "Tue, 01 Jun 2021 14:34:51 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Tue, 01 Jun 2021 14:34:51 GMT" }, { "key": "Content-Length", "value": "340" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"audienceGroups\": [\n {\n \"audienceGroupId\": 4602624580034,\n \"createRoute\": \"MESSAGING_API\",\n \"type\": \"UPLOAD\",\n \"description\": \"audienceGroupName_01\",\n \"status\": \"READY\",\n \"audienceCount\": 1,\n \"created\": 1622558086,\n \"permission\": \"READ_WRITE\",\n \"expireTimestamp\": 1638110086,\n \"isIfaAudience\": false\n },\n {\n \"audienceGroupId\": 8510957994442,\n \"createRoute\": \"MESSAGING_API\",\n \"type\": \"UPLOAD\",\n \"description\": \"audienceGroupName_01\",\n \"status\": \"READY\",\n \"audienceCount\": 1,\n \"created\": 1622558069,\n \"permission\": \"READ_WRITE\",\n \"expireTimestamp\": 1638110069,\n \"isIfaAudience\": false\n },\n {\n \"audienceGroupId\": 4552910771427,\n \"createRoute\": \"MESSAGING_API\",\n \"type\": \"UPLOAD\",\n \"description\": \"audienceGroupName_01_dev2\",\n \"status\": \"READY\",\n \"audienceCount\": 1,\n \"created\": 1622557376,\n \"permission\": \"READ_WRITE\",\n \"expireTimestamp\": 1638109376,\n \"isIfaAudience\": false\n },\n {\n \"audienceGroupId\": 2625795948220,\n \"createRoute\": \"MESSAGING_API\",\n \"type\": \"UPLOAD\",\n \"description\": \"audienceGroupName_01\",\n \"status\": \"READY\",\n \"audienceCount\": 1,\n \"created\": 1622348592,\n \"permission\": \"READ_WRITE\",\n \"expireTimestamp\": 1637900592,\n \"isIfaAudience\": false\n }\n ],\n \"hasNextPage\": false,\n \"totalCount\": 4,\n \"readWriteAudienceGroupTotalCount\": 4,\n \"size\": 20,\n \"page\": 1\n}" } ] }, { "name": "Delete audience", "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/{{audienceId}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "{{audienceId}}" ] } }, "response": [ { "name": "Delete audience", "originalRequest": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/4602624580034", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "4602624580034" ] } }, "status": "Accepted", "code": 202, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Content-Length", "value": "2" }, { "key": "x-line-request-id", "value": "a93472f5-de07-4a27-a376-74aa3eb1179e" }, { "key": "x-content-type-options", "value": "nosniff" }, { "key": "x-xss-protection", "value": "1; mode=block" }, { "key": "x-frame-options", "value": "DENY" }, { "key": "Expires", "value": "Tue, 01 Jun 2021 14:35:25 GMT" }, { "key": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "key": "Pragma", "value": "no-cache" }, { "key": "Date", "value": "Tue, 01 Jun 2021 14:35:25 GMT" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{}" } ] }, { "name": "Get shared audience data in Business Manager", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/shared/{{audienceGroupId}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "shared", "{{audienceGroupId}}" ] } }, "response": [] }, { "name": "Get a list of shared audiences in Business Manager", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "page", "value": "1", "type": "text" }, { "key": "description", "value": "audienceGroupName", "type": "text" }, { "key": "size", "value": "40", "type": "text" }, { "key": "createRoute", "value": "OA_MANAGER", "type": "text" } ] }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/shared/list?page=1&description=audienceGroupName&size=40&createRoute=OA_MANAGER", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "shared", "list" ], "query": [ { "key": "page", "value": "1" }, { "key": "description", "value": "audienceGroupName" }, { "key": "size", "value": "40" }, { "key": "createRoute", "value": "OA_MANAGER" } ] } }, "response": [] }, { "name": "New Request", "request": { "method": "PUT", "header": [ { "key": "Authorization", "value": "Bearer {channel access token}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"audienceGroupId\": \"{{audienceId}}\",\n \"uploadDescription\": \"{{audienceDescription}}\",\n \"audiences\": [\n {\n \"id\": \"U4af4980627...\"\n },\n {\n \"id\": \"U4af4980628...\"\n }\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/upload", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "upload" ] }, "description": "#### Rate limit\n\n60 requests per minute\n\nFor more information on rate limits, see [Rate limits](https://developers.line.biz/en/reference/messaging-api/#rate-limits).\n\n#### [#](https://developers.line.biz/en/reference/messaging-api/#update-upload-audience-group-request-headers)Request headers\n\nAuthorization\n\nRequired\n\nBearer `{channel access token}`\n\nContent-Type\n\nRequired\n\n`application/json`\n\n#### [#](https://developers.line.biz/en/reference/messaging-api/#update-upload-audience-group-request-body)Request body\n\naudienceGroupId\n\nNumber\n\nRequired\n\nThe audience ID\n\nuploadDescription\n\nString\n\nOptional\n\nThe description to register with the job (in `jobs[].description`). \nMax character limit: 300\n\naudiences\n\nArray\n\nRequired\n\nAn array of user IDs or IFAs \nMax number: 10,000\n\naudiences\\[\\].id\n\nString\n\nRequired\n\nA user ID or IFA" }, "response": [] } ] }, { "name": "Action Message", "item": [ { "name": "Send Quick reply", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"to\": \"{{userid}}\",\r\n \"messages\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"Select your favorite food category or send me your location!\",\r\n \"quickReply\": {\r\n \"items\": [\r\n {\r\n \"type\": \"action\",\r\n \"imageUrl\": \"https://example.com/sushi.png\",\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"label\": \"Sushi\",\r\n \"text\": \"Sushi\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"imageUrl\": \"https://example.com/sushi.png\",\r\n \"action\": {\r\n \"type\": \"postback\",\r\n \"label\": \"postback\",\r\n \"data\": \"action=buy&itemid=111\",\r\n \"text\": \"Buy\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"action\": {\r\n \"type\": \"camera\",\r\n \"label\": \"Camera\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"action\": {\r\n \"type\": \"cameraRoll\",\r\n \"label\": \"cameraRoll\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"action\": {\r\n \"type\": \"location\",\r\n \"label\": \"Send location\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"action\": {\r\n \"type\": \"uri\",\r\n \"label\": \"Phone order\",\r\n \"uri\": \"tel:00000000\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"action\": {\r\n \"type\": \"uri\",\r\n \"label\": \"Recommend to friends\",\r\n \"uri\": \"https://line.me/R/nv/recommendOA/@linedevelopers\"\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/push", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "push" ] } }, "response": [] } ], "description": "https://developers.line.biz/en/reference/messaging-api/#action-objects" }, { "name": "Tips", "item": [ { "name": "Imagemap set size", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"to\": \"{{userid}}\",\r\n \"messages\": [\r\n {\r\n \"type\": \"imagemap\",\r\n \"baseUrl\": \"{{img_url}}?w=auto\",\r\n \"altText\": \"This is an imagemap\",\r\n \"baseSize\": {\r\n \"width\": 1040,\r\n \"height\": 1040\r\n },\r\n \"actions\": [\r\n {\r\n \"type\": \"uri\",\r\n \"area\": {\r\n \"x\": 209,\r\n \"y\": 746,\r\n \"width\": 339,\r\n \"height\": 234\r\n },\r\n \"linkUri\": \"https://developers.line.biz/en/\"\r\n }\r\n ]\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://api.line.me/v2/bot/message/push", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "push" ] } }, "response": [] } ] }, { "name": "Account link", "item": [ { "name": "Issue link token", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "https://api.line.me/v2/bot/user/{{userid}}/linkToken", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "user", "{{userid}}", "linkToken" ] } }, "response": [] } ] }, { "name": "coupon", "item": [ { "name": "Creates a coupon.", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"couponId\", jsonData.couponId);" ], "type": "text/javascript", "packages": {} } } ], "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "\n{\n \"title\": \"Friends-only coupon\",\n \"description\": \"- To redeem your coupon, present this screen at checkout.\\n- Redeemable once only, even if previously redeemed only unintentionally by the customer.\\n- The validity period of this coupon may change or it may be canceled without notice.\",\n \"reward\": {\n \"type\": \"discount\",\n \"priceInfo\": {\n \"type\": \"fixed\",\n \"fixedAmount\": 100\n }\n },\n \"acquisitionCondition\": {\n \"type\": \"normal\"\n },\n \"startTimestamp\": 0,\n \"endTimestamp\": 1924959599,\n \"imageUrl\": \"https://developers.line.biz/media/messaging-api/coupon/sample-coupon-image-100-yen-off.jpg\",\n \"timezone\": \"ASIA_TOKYO\",\n \"visibility\": \"UNLISTED\",\n \"maxUseCountPerTicket\": 1\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://api.line.me/v2/bot/coupon", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "coupon" ] }, "description": "Creates a coupon.\n\nCoupons aren't automatically sent to users just by creating them. You need to send the created coupon as a message. For more information, see [Steps to send coupons using the Messaging API](https://developers.line.biz/en/docs/messaging-api/send-coupons-to-users/#send-coupons-using-messaging-api) in the Messaging API documentation.\n\n#### You can create up to 5,000 valid coupons." }, "response": [] }, { "name": "Discontinue a coupon", "request": { "auth": { "type": "noauth" }, "method": "PUT", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "https://api.line.me/v2/bot/coupon/{{couponId}}/close", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "coupon", "{{couponId}}", "close" ] }, "description": "Discontinues the specified coupon.\n\nOnce a coupon is discontinued, users who have already received it as a message will no longer be able to get it, and users who have already obtained it will no longer be able to use it.\n\nDiscontinued coupons can't be reactivated." }, "response": [] }, { "name": "Get a list of coupons", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "limit", "value": "100", "type": "text" }, { "key": "status", "value": "DRAFT,RUNNING", "type": "text" } ] }, "url": { "raw": "https://api.line.me/v2/bot/coupon?limit=100&status=DRAFT,RUNNING", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "coupon" ], "query": [ { "key": "limit", "value": "100" }, { "key": "status", "value": "DRAFT,RUNNING" } ] } }, "response": [] }, { "name": "Get details of a coupon", "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/v2/bot/coupon/{{couponId}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "coupon", "{{couponId}}" ] } }, "response": [] }, { "name": "Send a coupon", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "\n{\n \"messages\": [\n {\n \"type\": \"coupon\",\n \"couponId\": \"{{couponId}}\"\n }\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://api.line.me/v2/bot/message/broadcast", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "broadcast" ] }, "description": "## Send a coupon\n\nAfter creating a coupon and receiving the coupon ID, specify that coupon ID in a [coupon message](https://developers.line.biz/en/docs/messaging-api/message-types/#coupon-messages) and send it. If you don't know the coupon ID, you can [get the coupon list](https://developers.line.biz/en/docs/messaging-api/send-coupons-to-users/#check-coupon-list) to check it. \n \nCoupon messages can be sent as any of the following types of messages. You can also send coupons created using the Messaging API as messages in LINE Official Account Manager.\n\n- [Push message](https://developers.line.biz/en/reference/messaging-api/#send-push-message)\n \n- [Multicast message](https://developers.line.biz/en/reference/messaging-api/#send-multicast-message)\n \n- [Broadcast message](https://developers.line.biz/en/reference/messaging-api/#send-broadcast-message)\n \n- [Narrowcast message](https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message)\n \n- [Reply message](https://developers.line.biz/en/reference/messaging-api/#send-reply-message)" }, "response": [] } ], "description": "You can now create coupons using the Messaging API and send them as messages\n\n### Added Features\n\n- [Create a coupon](https://developers.line.biz/en/reference/messaging-api/#create-coupon)\n \n- [Discontinue a coupon](https://developers.line.biz/en/reference/messaging-api/#discontinue-coupon)\n \n- [Get a list of coupons](https://developers.line.biz/en/reference/messaging-api/#get-coupons-list)\n \n- [Get details of a coupon](https://developers.line.biz/en/reference/messaging-api/#get-coupon)\n \n- Send messages with the message type set to [Coupon message](https://developers.line.biz/en/docs/messaging-api/message-types/#coupon-messages)\n \n\nFor more information, see [Create coupons and send them to users](https://developers.line.biz/en/docs/messaging-api/send-coupons-to-users/) in the Messaging API documentation.\n\n### [#](https://developers.line.biz/en/news/2025/08/06/coupon-api/#coupon-api-sdk-20250806)LINE Messaging API SDK Updates\n\nFor more information about the update status of each SDK release in line with the addition of these new features, see the [LINE Messaging API SDK](https://developers.line.biz/en/docs/messaging-api/line-bot-sdk/) release notes." } ], "description": "[https://developers.line.biz/en/reference/messaging-api/](https://developers.line.biz/en/reference/messaging-api/)", "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "LINE Login v2.1", "item": [ { "name": "OAUTH", "item": [ { "name": "Issue access token", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "authorization_code", "type": "text" }, { "key": "code", "value": "1234567890abcde", "type": "text" }, { "key": "client_id", "value": "1234567890", "type": "text" }, { "key": "client_secret", "value": "1234567890abcdefghij1234567890ab", "type": "text" }, { "key": "code_verifier", "value": "wJKN8qz5t8SSI9lMFhBB6qwNkQBkuPZoCxzRhwLRUo1", "type": "text" }, { "key": "redirect_uri", "value": "https://example.com/auth?key=value", "type": "text" } ] }, "url": { "raw": "https://api.line.me/oauth2/v2.1/token", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "oauth2", "v2.1", "token" ] } }, "response": [] }, { "name": "Verify access token validity", "request": { "method": "GET", "header": [], "url": { "raw": "https://api.line.me/oauth2/v2.1/verify?access_token=eyJhbGciOiJIUzI1NiJ9.UnQ_o-GP0VtnwDjbK0C8E_NvK...", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "oauth2", "v2.1", "verify" ], "query": [ { "key": "access_token", "value": "eyJhbGciOiJIUzI1NiJ9.UnQ_o-GP0VtnwDjbK0C8E_NvK..." } ] } }, "response": [] }, { "name": "Refresh access token", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "refresh_token", "type": "text" }, { "key": "refresh_token", "value": "{your_refresh_token}", "type": "text" }, { "key": "client_id", "value": "{your_channel_id}", "type": "text" }, { "key": "client_secret", "value": "{your_channel_secret}", "type": "text" } ] }, "url": { "raw": "https://api.line.me/oauth2/v2.1/token", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "oauth2", "v2.1", "token" ] } }, "response": [] }, { "name": "Revoke access token", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "client_id", "value": "{channel id}", "type": "text" }, { "key": "client_secret", "value": "{channel secret}", "type": "text" }, { "key": "access_token", "value": "{access token}", "type": "text" } ] }, "url": { "raw": "https://api.line.me/oauth2/v2.1/revoke", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "oauth2", "v2.1", "revoke" ] } }, "response": [] }, { "name": "Verify ID token", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "id_token", "value": "eyJraWQiOiIxNmUwNGQ0ZTU2NzgzYTc5MmRjYjQ2ODRkOD...", "type": "text" }, { "key": "client_id", "value": "1234567890", "type": "text" } ] }, "url": { "raw": "https://api.line.me/oauth2/v2.1/verify", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "oauth2", "v2.1", "verify" ] } }, "response": [] }, { "name": "Deauthorize your app to which the user has granted permissions", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"userAccessToken\": \"{user access token}\"\n}" }, "url": { "raw": "https://api.line.me/user/v1/deauthorize", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "user", "v1", "deauthorize" ] } }, "response": [] }, { "name": "Get user information (OpenID)", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/oauth2/v2.1/userinfo", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "oauth2", "v2.1", "userinfo" ] }, "description": "Gets a user's ID, display name, and profile image. Requires an access token with the openid scope." }, "response": [] } ] }, { "name": "Profile", "item": [ { "name": "Get user profile", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/v2/profile", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "profile" ] }, "description": "Gets a user's ID, display name, profile image, and status message." }, "response": [] } ] }, { "name": "Friendship status", "item": [ { "name": "Friendship status", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/friendship/v1/status", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "friendship", "v1", "status" ] }, "description": "Gets a user's ID, display name, profile image, and status message." }, "response": [] } ] } ] }, { "name": "LINE MINI App", "item": [ { "name": "[Step 1] Get Channel Access Token", "item": [ { "name": "Issue stateless channel access token", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"access_token\", jsonData.access_token);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "client_credentials", "type": "text" }, { "key": "client_id", "value": "{{channel_id}}", "type": "text" }, { "key": "client_secret", "value": "{{channel_secret}}", "type": "text" } ] }, "url": { "raw": "https://api.line.me/oauth2/v3/token", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "oauth2", "v3", "token" ] }, "description": "Step 1: Get a channel access token for your LINE MINI App's Messaging API channel. This token will be used in subsequent API calls." }, "response": [] } ], "description": "First, obtain a channel access token from your LINE MINI App's linked Messaging API channel." }, { "name": "[Step 2] Issue Notification Token", "item": [ { "name": "Issue notification token", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"notificationToken\", jsonData.notificationToken);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"liffAccessToken\": \"{{liffAccessToken}}\"\n}" }, "url": { "raw": "https://api.line.me/message/v3/notifier/token", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "message", "v3", "notifier", "token" ] }, "description": "Step 2: Issue a notification token using the LIFF access token obtained from your LINE MINI App frontend.\n\n**How to get liffAccessToken:**\n1. In your LINE MINI App (LIFF), call `liff.getAccessToken()` after `liff.init()`\n2. Send this token to your backend server\n3. Use it in this API to get a notification token\n\n**Note:** The notification token expires 1 year after issuance and can send up to 5 service messages." }, "response": [] } ], "description": "Use the LIFF access token from your LINE MINI App to issue a notification token. Get liffAccessToken by calling `liff.getAccessToken()` in your LIFF app." }, { "name": "[Step 3] Send Service Message", "item": [ { "name": "Send service message", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"templateName\": \"your_template_name_en\",\n \"params\": {\n \"key1\": \"value1\"\n },\n \"notificationToken\": \"{{notificationToken}}\"\n}" }, "url": { "raw": "https://api.line.me/message/v3/notifier/send?target=service", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "message", "v3", "notifier", "send" ], "query": [ { "key": "target", "value": "service" } ] }, "description": "Step 3: Send a service message to the user.\n\n**Template Name Format:**\nUse BCP 47 language tag suffix:\n- `template_name_en` for English\n- `template_name_ja` for Japanese\n- `template_name_th` for Thai\n\n**Important:**\n- Register your message template in LINE Developers Console first\n- Each notification token can send up to 5 service messages\n- Service messages appear as official notifications from your LINE MINI App" }, "response": [] } ], "description": "Finally, send the service message using the notification token. Make sure your message template is registered in LINE Developers Console." } ], "description": "LINE MINI App API reference - https://developers.line.biz/en/reference/line-mini-app/\n\n## Service Messages Flow\n\n**Prerequisites:**\n1. Verified LINE MINI App\n2. Message template registered in LINE Developers Console\n3. LIFF access token from your LINE MINI App frontend\n\n**Steps:**\n1. **[Step 1]** Get channel access token from Messaging API channel\n2. **[Step 2]** Issue notification token using LIFF access token\n3. **[Step 3]** Send service message with registered template" }, { "name": "Server API", "item": [ { "name": "[Step 1] Channel Access Token", "item": [ { "name": "Issue short-lived channel access token", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"access_token\", jsonData.access_token);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "client_credentials", "type": "text" }, { "key": "client_id", "value": "{{line_login_client_id}}", "type": "text" }, { "key": "client_secret", "value": "{{line_login_client_secret}}", "type": "text" } ] }, "url": { "raw": "https://api.line.me/v2/oauth/accessToken", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "oauth", "accessToken" ] } }, "response": [] } ] }, { "name": "[Step 2] Create LIFF", "item": [ { "name": "Adding the LIFF app to a channel", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"liffId\", jsonData.liffId);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"view\": {\n \"type\": \"full\",\n \"url\": \"https://example.com/myservice\"\n },\n \"description\": \"Service\",\n \"features\": {\n \"ble\": true,\n \"qrCode\": true\n },\n \"permanentLinkPattern\": \"concat\",\n \"scope\": [\"profile\", \"chat_message.write\"],\n \"botPrompt\": \"none\"\n}" }, "url": { "raw": "https://api.line.me/liff/v1/apps", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "liff", "v1", "apps" ] } }, "response": [] }, { "name": "Update LIFF app settings", "request": { "method": "PUT", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"view\": {\n \"url\": \"https://new.example.com\"\n }\n}" }, "url": { "raw": "https://api.line.me/liff/v1/apps/{{liffId}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "liff", "v1", "apps", "{{liffId}}" ] } }, "response": [] }, { "name": "Get all LIFF apps", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/liff/v1/apps", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "liff", "v1", "apps" ] } }, "response": [] }, { "name": "Delete LIFF app from a channel", "request": { "method": "DELETE", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/liff/v1/apps/{{liffId}}", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "liff", "v1", "apps", "{{liffId}}" ] } }, "response": [] } ] } ] }, { "name": "LINE Shoping API", "item": [ { "name": "Product API", "item": [ { "name": "[POST] Create & Update & Delete", "item": [ { "name": "Create product", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"product_id\", jsonData.id);", "pm.globals.set(\"variants_id\", jsonData.variants[0].id);", "pm.globals.set(\"inventory_id\", jsonData.variants[0].inventoryId);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "User-Agent", "value": "{{company_name}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"brand\": \"ex10\",\n \"categoryId\": 17,\n \"code\": \"EX1001\",\n \"description\": \"ex10 product demo\",\n \"imageUrls\": [\n \"https://cloud.ex10.tech/public/filestore/Screenshot2566-06-24at11-b1d5107d-1249-11ee-be63-2ec4184fafd2.png\"\n ],\n \"instantDiscount\": 0,\n \"name\": \"ex10-demo\",\n \"variantOptions\": {\n \"option1\": {\n \"data\": [\n {\n \"imageUrl\": \"https://cloud.ex10.tech/public/filestore/Screenshot2566-06-24at11-b1d5107d-1249-11ee-be63-2ec4184fafd2.png\",\n \"value\": \"100\"\n }\n ],\n \"name\": \"RED\"\n }\n },\n \"variants\": [\n {\n \"barcode\": \"EX10DEMO\",\n \"onHandNumber\": 100,\n \"options\": [\n 0\n ],\n \"price\": 10,\n \"sku\": \"each\",\n \"weight\": 10\n }\n ]\n}" }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/products", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "products" ] }, "description": "## Create product\n\nAn API for product creation. For product Categories ID variable please find more information on [Development guideline](https://www.line-website.com/oaplus-public-api-doc-client/#tag/MyShopDevelopmentGuide)\n\n##### AUTHORIZATIONS:\n\n[X-API-KEY](https://www.line-website.com/oaplus-public-api-doc-client/#section/Authentication/X-API-KEY)\n\n##### REQUEST BODY SCHEMA: application/json\n\ncreate product request\n\n| brand |

string

Product brand

|\n| categoryIdrequired |

integer

Product category id

|\n| coderequired |

string

Product code

|\n| description |

string

Product description with HTML formatting support

|\n| imageUrlsrequired |

Array of strings non-empty

Product image urls

|\n| instantDiscount |

number

Product instant discount must be greater than 0. If instant discount amount is 0, the instant discount will be disabled.

|\n| namerequired |

string

Product name

|\n| variantOptions | object (product.ProductVariantOptions) |\n| variantsrequired |

Array of objects (product.ProductVariant) non-empty

Product variants

|\n\n### Responses\n\n**201** \n\nSuccess\n\n##### RESPONSE SCHEMA: application/json\n\n| brand |

string

Product brand name

|\n| category | object (product.Category) |\n| code |

string

Product code

|\n| description |

string

Product description with HTML formatting support

|\n| giftGroups |

Array of objects (product.GiftGroup)

Gift Groups of product

|\n| giftOption |

string

Product Gift Option

|\n| hasOnlyDefaultVariant |

boolean

If product doesn't have any variant will be returned 'true'

|\n| id |

integer

Identifying number of product

|\n| imageUrls |

Array of strings

Product images

|\n| instantDiscount |

number

If product doesn't have instant discount will be returned 'empty string' otherwise returned with number

|\n| isDisplay |

boolean

If product is displaying on storefront will be returned 'true'

|\n| name |

string

Product name

|\n| variantOptions |

Array of objects (product.VariantOption)

Product options such as size or color

|\n| variants |

Array of objects (product.Variant)

Product variants

|\n\n**400** \n\nBad request\n\n##### RESPONSE SCHEMA: application/json\n\n| code |

stringEnum: \"BAD_REQUEST\" \"DATA_CONFLICT\" \"INTERNAL_ERROR\" \"NOT_FOUND\" \"PERMISSION_DENIED\" \"UNAUTHORIZED\"

Error code

|\n| info |

object

Error info (optional)

|\n| message |

string

Error message

|\n| timestamp |

integer

Response timestamp

|\n\n**404** \n\nNot found\n\n##### RESPONSE SCHEMA: application/json\n\n| code |

stringEnum: \"BAD_REQUEST\" \"DATA_CONFLICT\" \"INTERNAL_ERROR\" \"NOT_FOUND\" \"PERMISSION_DENIED\" \"UNAUTHORIZED\"

Error code

|\n| info |

object

Error info (optional)

|\n| message |

string

Error message

|\n| timestamp |

integer

Response timestamp

|\n\n**500** \n\nInternal error\n\n##### RESPONSE SCHEMA: application/json\n\n| code |

stringEnum: \"BAD_REQUEST\" \"DATA_CONFLICT\" \"INTERNAL_ERROR\" \"NOT_FOUND\" \"PERMISSION_DENIED\" \"UNAUTHORIZED\"

Error code

|\n| info |

object

Error info (optional)

|\n| message |

string

Error message

|\n| timestamp |

integer

Response timestamp

|" }, "response": [] }, { "name": "Delete product variant", "request": { "method": "POST", "header": [ { "key": "User-Agent", "value": "{{company_name}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"RED\",\n \"value\": \"100\"\n}" }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/products/{{product_id}}/delete-variant-option", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "products", "{{product_id}}", "delete-variant-option" ] } }, "response": [] }, { "name": "Update product's display status", "request": { "method": "POST", "header": [ { "key": "User-Agent", "value": "{{company_name}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"brand\": \"string\",\n \"category\": {\n \"id\": 0,\n \"nameEn\": \"string\",\n \"nameTh\": \"string\"\n },\n \"code\": \"string\",\n \"description\": \"string\",\n \"giftGroups\": [\n {\n \"id\": 0,\n \"nameEn\": \"string\",\n \"nameTh\": \"string\"\n }\n ],\n \"giftOption\": \"string\",\n \"hasOnlyDefaultVariant\": true,\n \"id\": 0,\n \"imageUrls\": [\n \"string\"\n ],\n \"instantDiscount\": 0,\n \"isDisplay\": true,\n \"name\": \"string\",\n \"variantOptions\": [\n {\n \"name\": \"string\",\n \"values\": [\n \"string\"\n ]\n }\n ],\n \"variants\": [\n {\n \"availableNumber\": 0,\n \"barcode\": \"string\",\n \"discountedPrice\": 0,\n \"id\": 0,\n \"inventoryId\": 0,\n \"onHandNumber\": 0,\n \"options\": [\n {\n \"name\": \"string\",\n \"value\": \"string\"\n }\n ],\n \"price\": 0,\n \"readyToShipNumber\": 0,\n \"reservedNumber\": 0,\n \"sku\": \"string\",\n \"weight\": 0\n }\n ]\n}" }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/products/{{product_id}}/display-status/{{status}}", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "products", "{{product_id}}", "display-status", "{{status}}" ] }, "description": "Enum: \"onsale\" \"hide\"" }, "response": [] }, { "name": "Create product variants", "request": { "method": "POST", "header": [ { "key": "User-Agent", "value": "{{company_name}}", "description": "ชื่อองค์กรหรือบริษัท", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"variantOptions\": {\n \"option1\": {\n \"data\": [\n {\n \"imageUrl\": \"{{image}}\",\n \"value\": \"100\"\n }\n ],\n \"name\": \"RED\"\n }\n },\n \"variants\": [\n {\n \"barcode\": \"EX10DEMO\",\n \"onHandNumber\": 100,\n \"options\": [\n 0\n ],\n \"price\": 10,\n \"sku\": \"each\",\n \"weight\": 10\n }\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/products/{{product_id}}/variants", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "products", "{{product_id}}", "variants" ] } }, "response": [] } ] }, { "name": "[GET] Products", "item": [ { "name": "Get all products", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"product_id\", jsonData.data[0].id);", "pm.globals.set(\"variants_id\", jsonData.data[0].variants[0].id);", "pm.globals.set(\"inventory_id\", jsonData.data[0].variants[0].inventoryId);" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disabledSystemHeaders": { "user-agent": true } }, "request": { "method": "GET", "header": [ { "key": "User-Agent", "value": "{{company_name}}", "description": "ชื่อองค์กรหรือบริษัท", "type": "text" } ], "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/products", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "products" ], "query": [ { "key": "ids", "value": "", "disabled": true }, { "key": "skus", "value": "", "disabled": true }, { "key": "page", "value": "", "disabled": true }, { "key": "perPage", "value": "", "disabled": true } ] }, "description": "## Get all products\n\nAn API for getting a list of products\n\n##### AUTHORIZATIONS:\n\n[X-API-KEY](https://www.line-website.com/oaplus-public-api-doc-client/#section/Authentication/X-API-KEY)\n\n##### QUERY PARAMETERS\n\n| ids |

Array of strings

Filtered by multiple values of product id

|\n| skus |

Array of strings

Filtered by multiple values of product sku

|\n| page |

integerDefault: 1

For pagination, page is the page number to query the list of products

|\n| perPage |

integer \\[ 1 .. 100 \\]Default: 25

For pagination, per page is the number of showing products on a page

|\n\n### Responses\n\n**200** \n\nSuccess\n\n##### RESPONSE SCHEMA: application/json\n\n| currentPage |

integer

Current page number

|\n| data | Array of objects (product.Response) |\n| perPage |

integer

Number of showing products per page

|\n| totalPage |

integer

Total page numbers of the result

|\n| totalRow |

integer

Total number of products

|\n\n**400** \n\nBad request\n\n##### RESPONSE SCHEMA: application/json\n\n| code |

stringEnum: \"BAD_REQUEST\" \"DATA_CONFLICT\" \"INTERNAL_ERROR\" \"NOT_FOUND\" \"PERMISSION_DENIED\" \"UNAUTHORIZED\"

Error code

|\n| info |

object

Error info (optional)

|\n| message |

string

Error message

|\n| timestamp |

integer

Response timestamp

|\n\n**404** \n\nNot found\n\n##### RESPONSE SCHEMA: application/json\n\n| code |

stringEnum: \"BAD_REQUEST\" \"DATA_CONFLICT\" \"INTERNAL_ERROR\" \"NOT_FOUND\" \"PERMISSION_DENIED\" \"UNAUTHORIZED\"

Error code

|\n| info |

object

Error info (optional)

|\n| message |

string

Error message

|\n| timestamp |

integer

Response timestamp

|\n\n**500** \n\nInternal error\n\n##### RESPONSE SCHEMA: application/json\n\n| code |

stringEnum: \"BAD_REQUEST\" \"DATA_CONFLICT\" \"INTERNAL_ERROR\" \"NOT_FOUND\" \"PERMISSION_DENIED\" \"UNAUTHORIZED\"

Error code

|\n| info |

object

Error info (optional)

|\n| message |

string

Error message

|\n| timestamp |

integer

Response timestamp

|" }, "response": [] } ] }, { "name": "[PATCH] Update Product Price & Detail", "item": [ { "name": "Update product detail", "request": { "method": "PATCH", "header": [ { "key": "User-Agent", "value": "{{company_name}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"brand\": \"ex10\",\n \"categoryId\": 0,\n \"code\": \"EX1001\",\n \"description\": \"ex10 product demo\",\n \"imageUrls\": [\n \"{{image}}\"\n ],\n \"name\": \"ex10-demo2\"\n}" }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/products/{{product_id}}", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "products", "{{product_id}}" ] } }, "response": [] }, { "name": "Update product variant detail", "request": { "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "User-Agent", "value": "{{company_name}}", "description": "ชื่อองค์กรหรือบริษัท", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"barcode\": \"string\",\n \"id\": {{variants_id}},\n \"imageUrl\": \"{{image}}\",\n \"onHandNumber\": 0,\n \"price\": 100,\n \"sku\": \"each\",\n \"weight\": 40\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/products/{{product_id}}/variant", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "products", "{{product_id}}", "variant" ] } }, "response": [] }, { "name": "Update product price", "request": { "method": "PATCH", "header": [ { "key": "User-Agent", "value": "{{company_name}}", "description": "ชื่อองค์กรหรือบริษัท", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"instantDiscount\": 99999998,\n \"variants\": [\n {\n \"id\": {{variants_id}},\n \"price\": 1\n }\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/products/{{product_id}}/prices", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "products", "{{product_id}}", "prices" ] } }, "response": [] } ] }, { "name": "[DELETE] Product", "item": [ { "name": "Delete product", "request": { "method": "DELETE", "header": [ { "key": "User-Agent", "value": "{{company_name}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/products/{{product_id}}", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "products", "{{product_id}}" ] } }, "response": [] } ] } ], "description": "# Product\n\nManage your product via API" }, { "name": "Inventory API", "item": [ { "name": "[POST] Adjust & Increase", "item": [ { "name": "Adjust inventory", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "User-Agent", "value": "{{company_name}}", "description": "ชื่อองค์กรหรือบริษัท", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"amount\": 1\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/inventory/{{inventory_id}}/adjust", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "inventory", "{{inventory_id}}", "adjust" ] } }, "response": [] }, { "name": "Increase inventory", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "User-Agent", "value": "{{company_name}}", "description": "ชื่อองค์กรหรือบริษัท", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"amount\": 12\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/inventory/{{inventory_id}}/decrease", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "inventory", "{{inventory_id}}", "decrease" ] } }, "response": [] } ] }, { "name": "[PUT] Decrease", "item": [ { "name": "Decrease inventory", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "User-Agent", "value": "{{company_name}}", "description": "ชื่อองค์กรหรือบริษัท", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"amount\": 10\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/inventory/{{inventory_id}}/decrease", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "inventory", "{{inventory_id}}", "decrease" ] } }, "response": [] } ] } ], "description": "# Inventory\n\nManage your inventory via API" }, { "name": "Order API", "item": [ { "name": "[GET] Order", "item": [ { "name": "Get all orders", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = pm.response.json();", "pm.globals.set(\"orderNo\", jsonData.data[0].orderNumber);" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "User-Agent", "value": "{{company_name}}", "description": "ชื่อองค์กรหรือบริษัท", "type": "text" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/orders", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "orders" ] } }, "response": [] }, { "name": "Order detail", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "User-Agent", "value": "{{company_name}}", "description": "ชื่อองค์กรหรือบริษัท", "type": "text" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/orders/{{orderNo}}", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "orders", "{{orderNo}}" ] } }, "response": [] } ] }, { "name": "[POST] Paid (COD) & Ship", "item": [ { "name": "Mark as paid (COD)", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "User-Agent", "value": "{{company_name}}", "description": "ชื่อองค์กรหรือบริษัท", "type": "text" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/orders/{{orderNo}}/mark-as-paid", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "orders", "{{orderNo}}", "mark-as-paid" ] } }, "response": [] }, { "name": "Mark as ship", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "User-Agent", "value": "{{company_name}}", "description": "ชื่อองค์กรหรือบริษัท", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"trackingNumber\": \"string\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/orders/{{orderNo}}/mark-as-ship", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "orders", "{{orderNo}}", "mark-as-ship" ] } }, "response": [] } ] }, { "name": "[PUT] Tracking Number", "item": [ { "name": "Update tracking number", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" }, { "key": "User-Agent", "value": "{{company_name}}", "description": "ชื่อองค์กรหรือบริษัท", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"trackingNumber\": \"string\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://developers-oaplus.line.biz/myshop/v1/orders/{{orderNo}}/shipments", "protocol": "https", "host": [ "developers-oaplus", "line", "biz" ], "path": [ "myshop", "v1", "orders", "{{orderNo}}", "shipments" ] } }, "response": [] } ] } ], "description": "# Order\n\nManage your order via API" } ], "description": "# Getting started\n\nOAPlus public API allows you to integrate and manipulate your collected/stored data in our system. The API is based on REST principles supporting GET, POST, PUT, DELETE, and PATCH request. API usage may be limited to the service allowed (such as MyCustomer API access) and some may be available for all users (such as LINE SHOPPING API)\n\n## Issue an API key\n\nIn order to access our APIs, you will need an **Access Token**. As **Admin** role, you will first need to go to the **API key** page (located under Settings → API keys page from sidebar menu), then click the \"Generate\" button. You will then have generated an API Key **Access Token** as shown in the image below \n \n \n\n## Request headers\n\nThe following HTTP headers are included in API request.\n\n| Header | Description | Notes |\n| --- | --- | --- |\n| User-Agents Optional | The User-Agent request header is a characteristic string that lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent. Suggestion value is your `service name`, or `company name`. | `User-Agent: OA Plus Platform` |\n\n# Authentication\n\nTo authenticate and start using our APIs, you will need to send an [Access Token](https://www.line-website.com/oaplus-public-api-doc-client/#section/Getting-Started/Issue-an-API-Key) via `X-API-KEY` header in your API calls.\n\n## X-API-KEY\n\n| Security Scheme Type | API Key |\n| Header parameter name: | X-API-KEY |\n\n# Common specification\n\n## Base URL\n\nAll URLs referenced in the documentation have the following base: [https://developers-oaplus.line.biz](https://developers-oaplus.line.biz/) \nFor example\n\n- [https://developers-oaplus.line.biz/audience/v1/group/groups](https://developers-oaplus.line.biz/audience/v1/group/groups)\n- [https://developers-oaplus.line.biz/myshop/vi/products](https://developers-oaplus.line.biz/myshop/vi/products)\n- [https://developers-oaplus.line.biz/myshop/v1/orders/{orderNo}/mark-as-paid](https://developers-oaplus.line.biz/myshop/v1/orders/{orderNo}/mark-as-paid)\n \n\n## Possible response status codes\n\n| Status Code | Description | Notes |\n| --- | --- | --- |\n| 200 | OK | The request was successful. |\n| 400 | Bad Request | The request could not be understood by the server. Parameter might be invalid. |\n| 401 | Unauthorized | The request might be contain invalid Channel Access Token. |\n| 403 | Forbidden | Not authorized to access the resource. |\n| 404 | Not Found | The requested resource is not found. |\n| 429 | Too Many Request | The request is exceeded the rate limit. |\n| 500 | Internal Server Error | The server could not return the representation due to an internal server error. |\n\n## Rate limit\n\nA rate limit is the number of API calls that can be made within a given time period. If this limit is exceeded, you will receive an error message saying, **429 Too Many Requests.** \n \n\n| API | Resource | Rate Limit Request |\n| --- | --- | --- |\n| Per Hour | Per Minute | Per Second |\n| LINE SHOPPING API | Product API | \\- | 1,000 | 50 |\n| Order API | \\- | 1,000 | 50 |\n| Inventory API | \\- | 1,000 | 50 |\n| Other APIs | 5,000 | \\- | 500 |", "auth": { "type": "apikey", "apikey": [ { "key": "in", "value": "header", "type": "string" }, { "key": "value", "value": "{{x_api_key}}", "type": "string" }, { "key": "key", "value": "X-API-KEY", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }