{ "info": { "_postman_id": "fd95802d-2d90-4a8c-b76a-f3b679a0cad2", "name": "CLASS LINE API Example", "description": "สวัสดีครับทุกท่าน เราโอ๋ เทพนที โพธิ์จันทร์ [LINE API Expert]()\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": "16611391" }, "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": "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" } ] } }, "response": [] }, { "name": "Get number of units used this month", "request": { "method": "GET", "header": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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": "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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "key": "Authorization", "value": "Bearer {{access_token}}" } ], "url": { "raw": "https://api.line.me/membership/v1/list", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "membership", "v1", "list" ] } }, "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=20210527", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "delivery", "reply" ], "query": [ { "key": "date", "value": "20210527" } ] } }, "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=20210528", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "message", "delivery", "push" ], "query": [ { "key": "date", "value": "20210528" } ] } }, "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "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\": \"bubble\",\r\n \"body\": {\r\n \"type\": \"box\",\r\n \"layout\": \"vertical\",\r\n \"spacing\": \"md\",\r\n \"contents\": [\r\n {\r\n \"type\": \"button\",\r\n \"style\": \"primary\",\r\n \"action\": {\r\n \"type\": \"uri\",\r\n \"label\": \"Primary style button\",\r\n \"uri\": \"https://example.com\"\r\n }\r\n },\r\n {\r\n \"type\": \"button\",\r\n \"style\": \"secondary\",\r\n \"action\": {\r\n \"type\": \"uri\",\r\n \"label\": \"Secondary style button\",\r\n \"uri\": \"https://example.com\"\r\n }\r\n },\r\n {\r\n \"type\": \"button\",\r\n \"style\": \"link\",\r\n \"action\": {\r\n \"type\": \"uri\",\r\n \"label\": \"Link style button\",\r\n \"uri\": \"https://example.com\"\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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "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:09001234567\"\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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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, EX10\"\n },\n {\n \"type\": \"text\",\n \"text\": \"https://ex10.tech/\"\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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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\": \"text\",\n \"text\": \"Hello, EX10\"\n },\n {\n \"type\": \"text\",\n \"text\": \"https://ex10.tech/\"\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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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, EX10\"\n },\n {\n \"type\": \"text\",\n \"text\": \"https://ex10.tech/\"\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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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, EX10\"\n },\n {\n \"type\": \"text\",\n \"text\": \"https://ex10.tech/\"\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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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, EX10\"\n },\n {\n \"type\": \"text\",\n \"text\": \"https://ex10.tech/\"\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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n \"to\": \"{{userid}}\",\r\n \"messages\": [\r\n {\r\n \"type\": \"image\",\r\n \"originalContentUrl\": \"https://sv1.picz.in.th/images/2023/09/27/ddW1pft.jpeg\",\r\n \"previewImageUrl\": \"https://sv1.picz.in.th/images/2023/09/27/ddW1pft.jpeg\"\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" }, { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n \"replyToken\": \"dfa65bfc659c491080a12784bd8c181e\",\r\n \"messages\": [\r\n {\r\n \"type\": \"text\",\r\n \"text\": \"ผู้สร้างห้อง thepnatee เลือก scissors\\\\n-----ผู้ชนะได้แก่-----\\\\n 1. ✅\\\\n------ \\\\nแพ้เป็นพระ คนชนะคนนี้เป็นของเธอนะ\",\r\n \"quickReply\": {\r\n \"items\": [\r\n {\r\n \"type\": \"action\",\r\n \"imageUrl\": \"https://bucket.ex10.tech/images/8d325cbc-d31f-11ee-97d4-0242ac12000b/originalContentUrl.png\",\r\n \"action\": {\r\n \"type\": \"clipboard\",\r\n \"label\": \"คัดลองโค้ด\",\r\n \"text\": \"LINE1000\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"imageUrl\": \"https://bucket.ex10.tech/images/8d325cbc-d31f-11ee-97d4-0242ac12000b/originalContentUrl.png\",\r\n \"action\": {\r\n \"type\": \"clipboard\",\r\n \"label\": \"รายชื่อผู้เสมอ\",\r\n \"text\": \"ไม่พบชื่อผู้ชนะ\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"imageUrl\": \"https://bucket.ex10.tech/images/8d325cbc-d31f-11ee-97d4-0242ac12000b/originalContentUrl.png\",\r\n \"action\": {\r\n \"type\": \"clipboard\",\r\n \"label\": \"รายชื่อผู้แพ้\",\r\n \"text\": \"ไม่พบชื่อผู้ชนะ\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"imageUrl\": \"https://bucket.ex10.tech/images/8d325cbc-d31f-11ee-97d4-0242ac12000b/originalContentUrl.png\",\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"label\": \"เข้าร่วม\",\r\n \"text\": \"เข้าร่วม\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"imageUrl\": \"https://bucket.ex10.tech/images/c29daf78-d323-11ee-97d4-0242ac12000b/originalContentUrl.png\",\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"label\": \"กติกา\",\r\n \"text\": \"กติกา\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"imageUrl\": \"https://bucket.ex10.tech/images/bdbdcdd7-d381-11ee-97d4-0242ac12000b/originalContentUrl.png\",\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"label\": \"เริ่มเกมส์\",\r\n \"text\": \"เริ่มเกมส์\"\r\n }\r\n },\r\n {\r\n \"type\": \"action\",\r\n \"imageUrl\": \"https://bucket.ex10.tech/images/871f88ff-d3b0-11ee-97d4-0242ac12000b/originalContentUrl.png\",\r\n \"action\": {\r\n \"type\": \"message\",\r\n \"label\": \"ล้างเกมส์ของคุณ\",\r\n \"text\": \"ล้างเกมส์ของคุณ\"\r\n }\r\n }\r\n ]\r\n }\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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n \"to\": [\"{{userid}}\"],\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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "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\": 4552910771427\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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" }, { "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" }, { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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": [] } ], "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": "Group", "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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}}", "equals": true }, { "key": "Content-Type", "value": "application/json", "equals": true } ], "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" ] } }, "response": [ { "name": "New Request", "originalRequest": { "method": "PUT", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "equals": true }, { "key": "Content-Type", "value": "application/json", "equals": true } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "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/test", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "channel", "webhook", "test" ] } }, "response": [ { "name": "Test webhook endpoint", "originalRequest": { "method": "POST", "header": [ { "key": "Authorization", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "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/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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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", "name": "Content-Type", "type": "text", "value": "application/json" }, { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "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": "[3]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" } } ], "request": { "method": "POST", "header": [ { "key": "Authorization", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "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\": \"ASW Sync 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 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-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": "[4]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": "/Users/thepnatee/Desktop/richmenu_2.jpg" } }, "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": "[5]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": "/Users/thepnatee/Desktop/richmenu_2.jpg" } }, "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": "[6]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": "[6]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": "/Users/thepnatee/Desktop/works/asset-wise/document/richmenu/Richmenu New/page2.png" } }, "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": "[7]Set the default rich menu A", "request": { "method": "POST", "header": [ { "key": "Authorization", "type": "text", "value": "Bearer {{access_token}}" } ], "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": "[8]Create rich menu alias A", "request": { "method": "POST", "header": [ { "key": "Authorization", "type": "text", "value": "Bearer {{access_token}}" } ], "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": "[9]Create rich menu alias B", "request": { "method": "POST", "header": [ { "key": "Authorization", "type": "text", "value": "Bearer {{access_token}}" } ], "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": "[10]Create rich menu alias C", "request": { "method": "POST", "header": [ { "key": "Authorization", "type": "text", "value": "Bearer {{access_token}}" } ], "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": "[10]Create rich menu alias D", "request": { "method": "POST", "header": [ { "key": "Authorization", "type": "text", "value": "Bearer {{access_token}}" } ], "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": "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "image/jpeg" } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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", "type": "text", "value": "Bearer {{access_token}}" } ], "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)", "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\",\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": "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/9517397392712/updateDescription", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "9517397392712", "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/4552910771427", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "4552910771427" ] } }, "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/4602624580034", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "4602624580034" ] } }, "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 the authority level of the audience", "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/authorityLevel", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "authorityLevel" ] } }, "response": [ { "name": "Get the authority level of the audience", "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/authorityLevel", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "authorityLevel" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Server", "value": "openresty" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Content-Length", "value": "27" }, { "key": "x-line-request-id", "value": "ce7edb9a-15f5-4502-a2af-3dfbd9b9b340" }, { "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:53 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:53 GMT" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{\n \"authorityLevel\": \"PUBLIC\"\n}" } ] }, { "name": "Change the authority level of the 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 \"authorityLevel\": \"PUBLIC\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/authorityLevel", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "authorityLevel" ] } }, "response": [ { "name": "Change the authority level of the 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 \"authorityLevel\": \"PRIVATE\"\n}" }, "url": { "raw": "https://api.line.me/v2/bot/audienceGroup/authorityLevel", "protocol": "https", "host": [ "api", "line", "me" ], "path": [ "v2", "bot", "audienceGroup", "authorityLevel" ] } }, "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": "9f261362-2113-487d-9a72-e66282c4d5d9" }, { "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:39:20 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:39:20 GMT" }, { "key": "Connection", "value": "keep-alive" } ], "cookie": [], "body": "{}" } ] } ] }, { "name": "Action Message", "item": [ { "name": "Send Quick reply", "request": { "method": "POST", "header": [ { "key": "Authorization", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "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:09001234567\"\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", "type": "text", "value": "Bearer {{access_token}}" }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "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": "Before Using Setup", "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": [] } ], "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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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": "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": "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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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": [ { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "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 Notify", "item": [ { "name": "Notification", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "Context-Type", "value": "application/x-www-form-urlencoded", "type": "text" }, { "key": "Authorization", "value": "Bearer {{notify_token}}", "type": "text" } ], "body": { "mode": "formdata", "formdata": [ { "key": "message", "value": "Hello EX10, https://ex10.tech/v2/", "type": "text" }, { "key": "imageThumbnail", "value": "https://cloud.ex10.tech/public/filestore/S__10281123-12bb7acb-6c72-11ed-8169-de795a77894f.jpg", "type": "text" }, { "key": "imageFullsize", "value": "https://cloud.ex10.tech/public/filestore/S__10281123-12bb7acb-6c72-11ed-8169-de795a77894f.jpg", "type": "text" }, { "key": "imageFile", "value": "https://cloud.ex10.tech/public/filestore/S__10281123-12bb7acb-6c72-11ed-8169-de795a77894f.jpg", "type": "text" }, { "key": "stickerPackageId", "value": "446", "type": "text" }, { "key": "stickerId", "value": "1989", "type": "text" }, { "key": "notificationDisabled", "value": "false", "type": "text" } ] }, "url": { "raw": "https://notify-api.line.me/api/notify", "protocol": "https", "host": [ "notify-api", "line", "me" ], "path": [ "api", "notify" ] } }, "response": [] }, { "name": "Revoke Token", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "Context-Type", "value": "application/x-www-form-urlencoded", "type": "text" }, { "key": "Authorization", "value": "Bearer {{notify_access_token}}", "type": "text" } ], "url": { "raw": "https://notify-api.line.me/api/revoke", "protocol": "https", "host": [ "notify-api", "line", "me" ], "path": [ "api", "revoke" ] } }, "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\": \"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}", "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": null, "disabled": true }, { "key": "skus", "value": null, "disabled": true }, { "key": "page", "value": null, "disabled": true }, { "key": "perPage", "value": null, "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 \"https://cloud.ex10.tech/public/filestore/Screenshot2566-06-24at11-b1d5107d-1249-11ee-be63-2ec4184fafd2.png\"\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\": \"https://cloud.ex10.tech/public/filestore/Screenshot2566-06-24at11-b1d5107d-1249-11ee-be63-2ec4184fafd2.png\",\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": [ "" ] } } ] } ], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{access_token}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }