{"id":5004,"date":"2019-03-24T10:32:03","date_gmt":"2019-03-24T02:32:03","guid":{"rendered":"https:\/\/blog.hoyo.idv.tw\/?p=5004"},"modified":"2020-02-07T08:58:33","modified_gmt":"2020-02-07T00:58:33","slug":"line-messaging-api-line-%e5%b0%8d%e8%a9%b1%e6%a9%9f%e5%99%a8%e4%ba%ba","status":"publish","type":"post","link":"https:\/\/blog.hoyo.idv.tw\/?p=5004","title":{"rendered":"LINE Messaging API - LINE \u5c0d\u8a71\u6a5f\u5668\u4eba"},"content":{"rendered":"<h2>\u53c3\u8003\u8cc7\u6e90<\/h2>\n<ul>\n<li><a href=\"https:\/\/developers.line.me\/\" target=\"_blank\" rel=\"noopener\">LINE Developers<\/a><\/li>\n<li><a href=\"https:\/\/developers.line.biz\/en\/reference\/messaging-api\/\" target=\"_blank\" rel=\"noopener\">Messaging API reference<\/a><\/li>\n<li><a href=\"https:\/\/blog.toright.com\/posts\/5727\" target=\"_blank\" rel=\"noopener\">\u7528 PHP \u5be6\u73fe Line Message API \u63a5\u6536\u7cfb\u7d71\u8a0a\u606f<\/a><\/li>\n<li><a href=\"https:\/\/ithelp.ithome.com.tw\/users\/20107144\/ironman\/1548\" target=\"_blank\" rel=\"noopener\">ChatBot&amp;Chatbase \u7cfb\u5217<\/a><\/li>\n<li><a href=\"https:\/\/andynote.com\/?p=90\" target=\"_blank\" rel=\"noopener\">[Line Bot] Messaging Api \u56de\u8a71\u6a5f\u5668\u4eba (PHP)<\/a><\/li>\n<li><a href=\"https:\/\/medium.com\/hondtour\/line-chatbot-%E9%96%8B%E7%99%BC%E6%8C%87%E5%8D%97-%E4%BA%8C-3ce2d54b21ae\" target=\"_blank\" rel=\"noopener\">LINE Chatbot \u958b\u767c\u653b\u7565(\u4e8c)<\/a><\/li>\n<\/ul>\n<p>--<\/p>\n<h2>\u6c92\u6709\u7a0b\u5f0f\u7684\u751f\u6d3b\u5708\u662f\u4ec0\u9ebc\u6a23\u7684\uff1f<\/h2>\n<p>\u7c21\u55ae\u8aaa\u5c31\u53ea\u662f\u300c\u6c92\u6709\u7a0b\u5f0f\u81ea\u52d5\u5316\u300d\uff0c\u4e5f\u5c31\u662f\u6c92\u6709\u6a5f\u5668\u4eba\u81ea\u52d5\u56de\u7b54\uff0c\u53ef\u4ee5\u4e00\u5c0d\u4e00\u5ba2\u670d\u4e5f\u53ef\u4ee5\u767c\u8a0a\u606f\u7d66\u5168\u90e8\u597d\u53cb<\/p>\n<p><a href=\"https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/Image-065.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-5712\" src=\"https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/Image-065-300x184.png\" alt=\"\" width=\"300\" height=\"184\" srcset=\"https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/Image-065-300x184.png 300w, https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/Image-065-768x471.png 768w, https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/Image-065-1024x628.png 1024w, https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/Image-065-489x300.png 489w, https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/Image-065.png 1178w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u63db\u53e5\u8a71\u8aaa\uff0c\u5982\u679c\u60f3\u8981\u8b93\u5ba2\u6236\u81ea\u884c\u8f38\u5165\u95dc\u9375\u5b57\u5373\u53ef\u5f97\u5230\u8cc7\u8a0a\u5c31\u9700\u8981\u4f7f\u7528 API\uff0c\u9700\u8981\u5207\u63db\u5230\u4f55\u7a2e\u65b9\u6848\u5c31\u9700\u8981\u770b\u9032\u4e00\u6b65\u7684\u9700\u6c42<\/p>\n<p>--<\/p>\n<h2>\u540d\u8a5e\u91cb\u7591<\/h2>\n<p>\u751f\u6d3b\u5708 LINE@ \u5f9e\u00a0https:\/\/at.line.me\/tw\/ \u5efa\u7acb\u7684\u53eb\u505a\u751f\u6d3b\u5708\uff0c\u5f8c\u53f0\u662f\u00a0https:\/\/admin-official.line.me<\/p>\n<p>\u751f\u6d3b\u5708 LINE@ \u5efa\u7acb\u7684\u7a31\u4f5c\u300c\u5e33\u865f\u300d\uff0cLINE Developers \u5efa\u7acb\u7684\u53eb\u505a channel<\/p>\n<p>\u4f7f\u7528\u751f\u6d3b\u5708\u5fc5\u9808\u53e6\u5916\u5728\u624b\u6a5f\u4e0a\u4e0b\u8f09\u4f7f\u7528\u53e6\u4e00\u500b LINE@ \u7684 APP \u4f86\u7ba1\u7406 LINE \u751f\u6d3b\u5708\uff0c\u751f\u6d3b\u5708\u7684\u7ba1\u7406\u662f\u7121\u6cd5\u5f9e\u7db2\u9801\u5f8c\u53f0\u6216\u662f LINE \u53bb\u64cd\u4f5c\u7684<\/p>\n<p>--<\/p>\n<h2>Hoyo \u63d0\u4f9b\u7dda\u4e0a\u5de5\u5177<\/h2>\n<ul>\n<li><a href=\"https:\/\/hoyo.idv.tw\/?a=Tools\/LINEPush\" target=\"_blank\" rel=\"noopener\">LINE \u767c\u9001\u6e2c\u8a66 - LINEPush<\/a><\/li>\n<\/ul>\n<p>--<\/p>\n<h2>\u8cbb\u7528<\/h2>\n<p>\u5f9e https:\/\/manager.line.biz \u9032\u5165\uff0c\u9078\u64c7\u5c0d\u61c9 Accounts \u2192 \u53f3\u4e0a\u89d2 Settings \u2192 \u6700\u4e0b\u9762 Account details \u2192 Change plan (\u50cf\u8ff7\u5bae\u4e00\u6a23\u96e3\u627e)<\/p>\n<p><a href=\"https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/LINE_monthly_plan.png\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-6806\" src=\"https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/LINE_monthly_plan-300x132.png\" alt=\"\" width=\"300\" height=\"132\" srcset=\"https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/LINE_monthly_plan-300x132.png 300w, https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/LINE_monthly_plan-768x338.png 768w, https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/LINE_monthly_plan-1024x450.png 1024w, https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/LINE_monthly_plan-500x220.png 500w, https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2019\/03\/LINE_monthly_plan.png 1296w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>--<\/p>\n<h2>\u6d41\u7a0b\u3001\u6b65\u9a5f<\/h2>\n<ol>\n<li>\u5f9e\u00a0LINE Developers \u52a0\u5165\u958b\u767c\u8005<\/li>\n<li>\u65b0\u589e\u6642\u9078\u64c7\u300cMessaging API\u300d<\/li>\n<li>Plan \u2192\u00a0Developer Trial<\/li>\n<li>\u65b0\u589e\u5f8c\u518d\u6b21\u9078\u64c7\u8a2d\u5b9a\n<ol>\n<li>Channel access token : \u7522\u751f API \u767c\u9001\u4f7f\u7528 access token<\/li>\n<li>Use webhooks : Enabled<\/li>\n<li>Webhook URL : \u63a5\u53d7 LINE \u8a0a\u606f\u7684\u7db2\u5740<\/li>\n<\/ol>\n<\/li>\n<li>\u5206\u4eab QRCode \u52a0\u5165 LINE \u6a5f\u5668\u4eba<\/li>\n<\/ol>\n<p>--<\/p>\n<h2>Webhook\u00a0URL - \u63a5\u6536\u8a0a\u606f\u7684 Reply.php<\/h2>\n<p>&nbsp;<\/p>\n<pre class=\"lang:php decode:true \">&lt;?php\r\n$content = file_get_contents('php:\/\/input');\r\n$json = json_decode($content, true);\r\n\r\n\/*\r\nArray\r\n(\r\n    [events] =&gt; Array\r\n        (\r\n            [0] =&gt; Array\r\n                (\r\n                    [type] =&gt; message\r\n                    [replyToken] =&gt; 774ac5a25e364a27baadc02cb4b85d3b\r\n                    [source] =&gt; Array\r\n                        (\r\n                            [userId] =&gt; Ub6f482e797e6b2dd51916f82317c6852\r\n                            [type] =&gt; user\r\n                        )\r\n\r\n                    [timestamp] =&gt; 1549076498796\r\n                    [message] =&gt; Array\r\n                        (\r\n                            [type] =&gt; text\r\n                            [id] =&gt; 9285802797745\r\n                            [text] =&gt; Jjj\r\n                        )\r\n                )\r\n        )\r\n    [destination] =&gt; Ue1a6a9ecfd1fa5147f94093b2995a511\r\n)\r\n*\/<\/pre>\n<p>&nbsp;<\/p>\n<p>--<\/p>\n<h2>\u63a5\u6536 LINE \u7684\u8a0a\u606f<\/h2>\n<h2 style=\"font-style: normal; line-height: 24.375px;\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-5008\" src=\"https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2018\/08\/Image-008.png\" alt=\"\" width=\"353\" height=\"588\" srcset=\"https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2018\/08\/Image-008.png 353w, https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2018\/08\/Image-008-180x300.png 180w\" sizes=\"(max-width: 353px) 100vw, 353px\" \/><\/h2>\n<p>\u6536\u5230\u7684\u8a0a\u606f\u662f JSON \u683c\u5f0f\uff0c\u5927\u6982\u9577\u9019\u6a23<\/p>\n<pre class=\"lang:default decode:true\">{\"events\":[{\"type\":\"message\",\"replyToken\":\"abf341d141ea4d4c94cd510871163f84\",\"source\":{\"userId\":\"Uc5629999999999999999999c88ed8\",\"type\":\"user\"},\"timestamp\":1535249611645,\"message\":{\"type\":\"text\",\"id\":\"8475560626630\",\"text\":\"...\"}}]}<\/pre>\n<p>\u6bd4\u8f03\u5bb9\u6613\u770b\u7684\u683c\u5f0f<\/p>\n<pre class=\"height-set:true lang:default decode:true\">Array\r\n(\r\n    [events] =&gt; Array\r\n        (\r\n            [0] =&gt; Array\r\n                (\r\n                    [type] =&gt; message\r\n                    [replyToken] =&gt; 65bc479f0e964d99979214d4a9056613\r\n                    [source] =&gt; Array\r\n                        (\r\n                            [userId] =&gt; Uc5629999999999999999999c88ed8\r\n                            [type] =&gt; user\r\n                        )\r\n                    [timestamp] =&gt; 1535250117828\r\n                    [message] =&gt; Array\r\n                        (\r\n                            [type] =&gt; text\r\n                            [id] =&gt; 8475588288350\r\n                            [text] =&gt; ...\r\n                        )\r\n                )\r\n        )\r\n)<\/pre>\n<p>&nbsp;<\/p>\n<p>--<\/p>\n<h2>Reply \u4e00\u554f\u4e00\u7b54\u7684 LINE \u6a5f\u5668\u4eba<\/h2>\n<p>&nbsp;<\/p>\n<p>--<\/p>\n<h2>\u7fa4\u767c<\/h2>\n<ul>\n<li><a href=\"https:\/\/developers.line.me\/en\/reference\/messaging-api\/#send-multicast-messages\" target=\"_blank\" rel=\"noopener\">Messaging API reference -\u00a0Send multicast messages<\/a><\/li>\n<\/ul>\n<pre class=\"lang:default decode:true\">curl -v -X POST https:\/\/api.line.me\/v2\/bot\/message\/multicast \\\r\n-H 'Content-Type:application\/json' \\\r\n-H 'Authorization: Bearer {channel access token}' \\\r\n-d '{\r\n    \"to\": [\"U4af4980629...\",\"U0c229f96c4...\"],\r\n    \"messages\":[\r\n        {\r\n            \"type\":\"text\",\r\n            \"text\":\"Hello, world1\"\r\n        },\r\n        {\r\n            \"type\":\"text\",\r\n            \"text\":\"Hello, world2\"\r\n        }\r\n    ]\r\n}'<\/pre>\n<p>--<\/p>\n<h2>\u767c\u9001 - \u5716\u6a94<\/h2>\n<ul>\n<li><a href=\"https:\/\/developers.line.biz\/en\/reference\/messaging-api\/#image-message\" target=\"_blank\" rel=\"noopener\">Image message<\/a><\/li>\n<\/ul>\n<pre class=\"lang:default decode:true \">'to' =&gt; array('user1', 'user2', ...),\r\n'messages' =&gt; [\r\n    [\r\n        'type' =&gt; 'image',\r\n        'originalContentUrl' =&gt; 'https:\/\/hoyo.idv.tw\/line.jpg',\r\n        'previewImageUrl' =&gt; 'https:\/\/hoyo.idv.tw\/line.jpg'\r\n    ]\r\n]<\/pre>\n<p>--<\/p>\n<h2>\u767c\u9001 - \u8996\u983b<\/h2>\n<ul>\n<li><a href=\"https:\/\/developers.line.biz\/en\/reference\/messaging-api\/#video-message\" target=\"_blank\" rel=\"noopener\">Video message<\/a><\/li>\n<\/ul>\n<p>\u5b98\u65b9\u6587\u4ef6\u8aaa\u6709\u5f71\u7247\u4ee5\u53ca\u9810\u89bd\u5716\u5927\u5c0f\u9650\u5236\uff0c\u5be6\u969b\u4e0a\u56e0\u70ba\u6a94\u6848\u653e\u5728\u81ea\u5df1\u4e3b\u6a5f\u4e0a\uff0c\u6240\u4ee5\u4e26\u7121\u9650\u5236<\/p>\n<pre class=\"lang:default decode:true\">'to' =&gt; array('user1', 'user2', ...),\r\n'messages' =&gt; [\r\n    [\r\n        'type' =&gt; 'video',\r\n        'originalContentUrl' =&gt; 'https:\/\/hoyo.idv.tw\/line.mp4',\r\n        'previewImageUrl' =&gt; 'https:\/\/hoyo.idv.tw\/line.jpg'\r\n    ]\r\n]<\/pre>\n<p>&nbsp;<\/p>\n<p>--<\/p>\n<h2>\u767c\u9001 - \u97f3\u983b<\/h2>\n<ul>\n<li><a href=\"https:\/\/developers.line.biz\/en\/reference\/messaging-api\/#audio-message\" target=\"_blank\" rel=\"noopener\">Audio message<\/a><\/li>\n<\/ul>\n<pre class=\"lang:default decode:true\">'to' =&gt; array('user1', 'user2', ...),\r\n'messages' =&gt; [\r\n    [\r\n        'type' =&gt; 'audio',\r\n        'originalContentUrl' =&gt; 'https:\/\/hoyo.idv.tw\/line.mp4',\r\n        'duration' =&gt; 10000\r\n    ]\r\n]<\/pre>\n<ul>\n<li>duration \u55ae\u4f4d\u70ba\u5343\u5206\u4e4b\u4e00\u6beb\u79d2\uff0c\u53ea\u548c\u986f\u793a\u64ad\u653e\u5012\u6578\u6709\u95dc\uff0c\u97f3\u983b\u6709\u591a\u9577\u9084\u662f\u64ad\u591a\u9577<\/li>\n<\/ul>\n<p>--<\/p>\n<h2>\u53d6\u5f97\u4f7f\u7528\u8005\u8cc7\u8a0a<\/h2>\n<ul>\n<li><a href=\"https:\/\/developers.line.me\/en\/reference\/messaging-api\/#get-profile\" target=\"_blank\" rel=\"noopener\">Messaging API reference -\u00a0Get profile<\/a><\/li>\n<\/ul>\n<pre class=\"lang:default decode:true \">curl -v -X GET https:\/\/api.line.me\/v2\/bot\/profile\/{userId} \\\r\n-H 'Authorization: Bearer {channel access token}'<\/pre>\n<p>PHP<\/p>\n<p>\u56de\u50b3 JSON<\/p>\n<pre class=\"lang:default decode:true \">{\r\n<span style=\"color: #333333; font-family: Consolas, Monaco, monospace; font-style: normal; line-height: 1.5;\">    \"userId\":\"U4af4980629...\",\r\n<\/span>    \"displayName\":\"LINE taro\",\r\n    \"pictureUrl\":\"http:\/\/obs.line-apps.com\/...\",\r\n    \"statusMessage\":\"Hello, LINE!\"\r\n}<\/pre>\n<p>--<\/p>\n<h2>\u4f7f\u7528 LINE@ \u5f8c\u53f0<\/h2>\n<ul>\n<li><a class=\"mdGHD01AT\" href=\"https:\/\/admin-official.line.me\/\" target=\"_blank\" rel=\"noopener\">LINE@Manager<\/a><\/li>\n<\/ul>\n<p>\u5b98\u65b9\u5f8c\u53f0\u7684\u8a0a\u606f\u767c\u9001\u4e26\u4e0d\u662f\u7acb\u5373\uff0c 2019-3-24 \u5be6\u6e2c\u6642\u6709 3 \u5206\u9418\u7684\u5ef6\u9072\uff0c\u52a0\u5165\u597d\u53cb\u4e14\u5df2\u53ef\u63a5\u6536\u8a0a\u606f\u4e5f\u6c92\u6709\u66f4\u65b0\u597d\u53cb\u6578<\/p>\n<p>--<\/p>\n<h2>\u5404\u7a2e\u63a5\u6536\u5230\u7684 Json<\/h2>\n<p><strong>\u52a0\u5165<\/strong><\/p>\n<pre class=\"lang:default decode:true\">Array\r\n(\r\n    [events] =&gt; Array\r\n        (\r\n            [0] =&gt; Array\r\n                (\r\n                    [type] =&gt; follow\r\n                    [replyToken] =&gt; 292412474b244a969141b9eae2d5fdf2\r\n                    [source] =&gt; Array\r\n                        (\r\n                            [userId] =&gt; Ub6f482e797e6b2dd51916f82317c6852\r\n                            [type] =&gt; user\r\n                        )\r\n                    [timestamp] =&gt; 1557142887582\r\n                )\r\n        )\r\n    [destination] =&gt; U533b39b605394f172e618c9664f6199d\r\n)<\/pre>\n<p><strong>\u9000\u51fa (\u96b1\u85cf\u5f8c\u522a\u9664)<\/strong><\/p>\n<pre class=\"lang:default decode:true \">Array\r\n(\r\n    [events] =&gt; Array\r\n        (\r\n            [0] =&gt; Array\r\n                (\r\n                    [type] =&gt; unfollow\r\n                    [source] =&gt; Array\r\n                        (\r\n                            [userId] =&gt; Ub6f482e797e6b2dd51916f82317c6852\r\n                            [type] =&gt; user\r\n                        )\r\n                    [timestamp] =&gt; 1557142871168\r\n                )\r\n        )\r\n    [destination] =&gt; U533b39b605394f172e618c9664f6199d\r\n)<\/pre>\n<p>\u6587\u5b57\u8a0a\u606f<\/p>\n<pre class=\"lang:default decode:true\">Array\r\n(\r\n    [events] =&gt; Array\r\n        (\r\n            [0] =&gt; Array\r\n                (\r\n                    [type] =&gt; message\r\n                    [replyToken] =&gt; 883e02438b034a92bc7d7dc8cca7e563\r\n                    [source] =&gt; Array\r\n                        (\r\n                            [userId] =&gt; Ub6f482e797e6b2dd51916f82317c6852\r\n                            [type] =&gt; user\r\n                        )\r\n                    [timestamp] =&gt; 1557156332815\r\n                    [message] =&gt; Array\r\n                        (\r\n                            [type] =&gt; text\r\n                            [id] =&gt; 9819169068594\r\n                            [text] =&gt; 333\r\n                        )\r\n                )\r\n        )\r\n    [destination] =&gt; U533b39b605394f172e618c9664f6199d\r\n)<\/pre>\n<p>\u8868\u60c5\u8cbc<\/p>\n<pre class=\"lang:default decode:true \">Array\r\n(\r\n    [events] =&gt; Array\r\n        (\r\n            [0] =&gt; Array\r\n                (\r\n                    [type] =&gt; message\r\n                    [replyToken] =&gt; 79f3c0f0fda9497c818396b174b46958\r\n                    [source] =&gt; Array\r\n                        (\r\n                            [userId] =&gt; Ub6f482e797e6b2dd51916f82317c6852\r\n                            [type] =&gt; user\r\n                        )\r\n                    [timestamp] =&gt; 1557157644171\r\n                    [message] =&gt; Array\r\n                        (\r\n                            [type] =&gt; sticker\r\n                            [id] =&gt; 9819257408121\r\n                            [stickerId] =&gt; 48135\r\n                            [packageId] =&gt; 2000000\r\n                        )\r\n                )\r\n        )\r\n    [destination] =&gt; U533b39b605394f172e618c9664f6199d\r\n)<\/pre>\n<p>\u8cbc\u5716<\/p>\n<pre class=\"lang:default decode:true\">Array\r\n(\r\n    [events] =&gt; Array\r\n        (\r\n            [0] =&gt; Array\r\n                (\r\n                    [type] =&gt; message\r\n                    [replyToken] =&gt; 1de46282b6c64322be8b89b571fffe66\r\n                    [source] =&gt; Array\r\n                        (\r\n                            [userId] =&gt; Ub6f482e797e6b2dd51916f82317c6852\r\n                            [type] =&gt; user\r\n                        )\r\n                    [timestamp] =&gt; 1557157662262\r\n                    [message] =&gt; Array\r\n                        (\r\n                            [type] =&gt; sticker\r\n                            [id] =&gt; 9819258559387\r\n                            [stickerId] =&gt; 12881334\r\n                            [packageId] =&gt; 1319240\r\n                        )\r\n                )\r\n        )\r\n    [destination] =&gt; U533b39b605394f172e618c9664f6199d\r\n)<\/pre>\n<p>\u5716\u6a94<\/p>\n<pre class=\"lang:default decode:true\">Array\r\n(\r\n    [events] =&gt; Array\r\n        (\r\n            [0] =&gt; Array\r\n                (\r\n                    [type] =&gt; message\r\n                    [replyToken] =&gt; 915eb2f10a1d4f8b8e2430bbd6c9696b\r\n                    [source] =&gt; Array\r\n                        (\r\n                            [userId] =&gt; Ub6f482e797e6b2dd51916f82317c6852\r\n                            [type] =&gt; user\r\n                        )\r\n                    [timestamp] =&gt; 1557160096892\r\n                    [message] =&gt; Array\r\n                        (\r\n                            [type] =&gt; image\r\n                            [id] =&gt; 9819400393369\r\n                            [contentProvider] =&gt; Array\r\n                                (\r\n                                    [type] =&gt; line\r\n                                )\r\n                        )\r\n                )\r\n        )\r\n    [destination] =&gt; U533b39b605394f172e618c9664f6199d\r\n)<\/pre>\n<p>\u5f71\u7247<\/p>\n<pre class=\"lang:default decode:true\">Array\r\n(\r\n    [events] =&gt; Array\r\n        (\r\n            [0] =&gt; Array\r\n                (\r\n                    [type] =&gt; message\r\n                    [replyToken] =&gt; d116c4c39c6a4369bd15525b3f4f97c2\r\n                    [source] =&gt; Array\r\n                        (\r\n                            [userId] =&gt; Ub6f482e797e6b2dd51916f82317c6852\r\n                            [type] =&gt; user\r\n                        )\r\n                    [timestamp] =&gt; 1557160527665\r\n                    [message] =&gt; Array\r\n                        (\r\n                            [type] =&gt; video\r\n                            [id] =&gt; 9819423462427\r\n                            [contentProvider] =&gt; Array\r\n                                (\r\n                                    [type] =&gt; line\r\n                                )\r\n                            [duration] =&gt; 197400\r\n                        )\r\n                )\r\n        )\r\n    [destination] =&gt; U533b39b605394f172e618c9664f6199d\r\n)<\/pre>\n<p>--<\/p>\n<h2>\u53d6\u5f97\u5716\u3001\u5f71\u97f3\u6a94\u6848\u5167\u5bb9<\/h2>\n<ul>\n<li><a href=\"https:\/\/developers.line.biz\/en\/reference\/messaging-api\/#get-content\" target=\"_blank\" rel=\"noopener\">Get content<\/a><\/li>\n<\/ul>\n<p>\u5fc5\u9808\u4f7f\u7528\u548c message \u76f8\u540c\u7684 bot \u624d\u53ef\u4ee5\u53d6\u5f97\u5167\u5bb9<\/p>\n<p>https:\/\/api.line.me\/v2\/bot\/message\/{messageId}\/content<\/p>\n<p>--<\/p>\n<h2>\u986f\u793a\u8cbc\u5716\u3001\u8868\u60c5\u8cbc<\/h2>\n<ul>\n<li><a href=\"https:\/\/blog.hoyo.idv.tw\/?p=5979\" target=\"_blank\" rel=\"noopener\">LINE \u2013 \u8cbc\u5716\u3001\u8868\u60c5\u8cbc\u4e0b\u8f09<\/a><\/li>\n<\/ul>\n<p>--<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"5004\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;15,837&nbsp;total views<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u53c3\u8003\u8cc7\u6e90 LINE Devel...<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"5004\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;15,837&nbsp;total views<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[287],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/5004"}],"collection":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5004"}],"version-history":[{"count":35,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/5004\/revisions"}],"predecessor-version":[{"id":6808,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/5004\/revisions\/6808"}],"wp:attachment":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}