IM: May 2016 Archives


Vote 0 Votes

LINE 於四月初開始提供 BOT API 試用, 可登入 LINE Business Center 申請
API Reference
需準備一台有 HTTPS 服務的 Web Server, 用來接收 Callback,
不能用自簽的 SSL, 否則 VERIFY 會出現 Could not connect using SSL. 可去申請 Let's Encrypt - Free SSL/TLS Certificates
當有人送訊息到 BOT 帳號, 系統會送 POST message 到指定的 Callback URL (由後台設定),
觀察 Source IP 都來自, 所以 Server 要 Allow 這一段
訊息是 JSON 格式, 大概像這樣(有經過 formating)

PHP 的回話範例, 將前三行換成自己的即可
Channel ID、Channel Secret、MID 可以在 LINE Developers 後台找到

基本貼圖「饅頭人&詹姆士」 STKPKGID:1, STKVER:100 的 API 參數編號 STKID 依序如下

第1列 STKID 4,13,2,10,17,401,402,5,15,1
第2列 STKID 3,16,403,404,405,406,11,7,21,14
第3列 STKID 8,9,12,6,100,101,102,103,104,105
第4列 STKID 106,107,108,109,110,111,112,113,114,115
第5列 STKID 116,117,118,407,408,409,410,411,412,413
第6列 STKID 414,415,416,417,418,419,420,421,422,423
第7列 STKID 424,425,426,427,428,429,430,119,120,121
第8列 STKID 122,123,124,125,126,127,128,129,130,131
第9列 STKID 132,133,134,135,136,137,138,139

基本貼圖「熊大&兔兔」 STKPKGID:2,STKVER:100 的 API 參數編號 STKID 依序如下

第1列 STKID 140,141,142,143,501,502,503,144,145,146
第2列 STKID 147,504,505,506,507,148,149,150,151,152
第3列 STKID 153,154,155,19,508,509,510,511,512,513
第4列 STKID 18,38,514,515,516,156,158,157,517,518
第5列 STKID 519,520,159,521,522,523,524,525,22,34
第6列 STKID 32,23,526,527,39,33,24,25,27,29
第7列 STKID 30,31,26,160,161,162,163,164,165,166
第8列 STKID 167,168,169,170,171,172,173,174,175,176
第9列 STKID 177,178,179,37,36,46,35,28,20,42
第10列 STKID 41,47,43,45,40,44

基本貼圖「櫻桃可可」 STKPKGID:3,STKVER:100 的 API 參數編號 STKID 依序如下

第1列 STKID 180,181,182,183,184,185,186,187,188,189
第2列 STKID 190,191,192,193,194,195,196,197,198,199
第3列 STKID 200,201,202,203,204,205,206,207,208,209
第4列 STKID 210,211,212,213,214,215,216,217,218,219
第5列 STKID 220,221,222,223,224,225,226,227,228,229
第6列 STKID 230,231,232,233,234,235,236,237,238,239
第7列 STKID 240,241,242,243,244,245,246,247,248,249
第8列 STKID 250,251,252,253,254,255,256,257,258,259

基本貼圖「表情圖片」 STKPKGID:4,STKVER:100 的 API 參數編號 STKID 依序如下

第1列 STKID 263,264,265,266,267,268,601,602,603,604
第2列 STKID 605,606,260,261,262,607,269,270,271,272
第3列 STKID 273,608,274,275,276,277,278,609,610,282
第4列 STKID 283,291,279,280,281,284,285,611,286,612
第5列 STKID 288,289,613,614,615,290,616,617,292,293
第6列 STKID 294,295,296,618,619,287,297,298,299,300
第7列 STKID 301,302,620,303,304,305,306,307,621,622
第8列 STKID 623,624,625,629,627,628,626,630,631,632

Recent Entries

About this Archive

This page is an archive of entries in the IM category from May 2016.

IM: November 2015 is the previous archive.

IM: February 2018 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives