B 3 line bot live coding

4,583 views

Published on

TBD

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,583
On SlideShare
0
From Embeds
0
Number of Embeds
3,072
Actions
Shares
0
Downloads
51
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

B 3 line bot live coding

  1. 1. BOT API Trial Sending Messages • Text • Image • Video • Audio • Location • Sticker • Rich Message
  2. 2. BOT API Trial Sending Messages • Text • Image • Video • Audio • Location • Sticker • Rich Message
  3. 3. BOT API Trial Sending Messages • Text • Image • Video • Audio • Location • Sticker • Rich Message
  4. 4. BOT API Trial Problems Complexity of features with rich UI/UX Need to send message one-by-one in order to receive response from users Cannot join group Etc… API is complex
  5. 5. LINE BOT & Messaging API New Message API Added new MessageType Events that can be accepted via webhook Participation in groups New features added to LINE Bot
  6. 6. New Messaging API
  7. 7. New Messaging API LINE Chat (1-on-1 or group) 1. Reply API LINE Server Bot Application LINE Message Your System Webhook Reply ID
  8. 8. New Messaging API LINE Chat (1-on-1 or group) 1. Reply API LINE Server Bot Application LINE Message Your System Webhook Reply ID Message Reply With reply ID
  9. 9. New Messaging API LINE Server 2. Push API LINE Chat (1-on-1 or group) Bot Application LINE Message Your System Push with user ID / group ID
  10. 10. BOT API Trial Message API curl -X POST ¥ -H 'Content-Type: application/json' ¥ -H 'X-Line-ChannelID: <Channel ID>' ¥ -H 'X-Line-ChannelSecret: <Channel Secret>' ¥ -H 'X-Line-Trusted-User-With-ACL: <Channel MID>' ¥ -d '{ "to":["userId1"], "toChannel":1383378250, "eventType":"138311608800106203", "content":{ "contentType":1, "toType":1, "text":"Hello, Jose!" } }’ https://trialbot-api.line.me/v1/events
  11. 11. BOT API Trial Message API curl -X POST ¥ -H 'Content-Type: application/json' ¥ -H 'X-Line-ChannelID: <Channel ID>' ¥ -H 'X-Line-ChannelSecret: <Channel Secret>' ¥ -H 'X-Line-Trusted-User-With-ACL: <Channel MID>' ¥ -d '{ "to":["userId1"], "toChannel":1383378250, "eventType":"138311608800106203", "content":{ "contentType":1, "toType":1, "text":"Hello, Jose!" } }’ https://trialbot-api.line.me/v1/events Too many Bot Info Fixed Magic Number Unknown value Fixed Magic Number
  12. 12. New Messaging API curl -X POST ¥ -H "Content-Type:application/json" ¥ -H "Authorization: Bearer <Access Token>" ¥ -d '{ "to": "userId or groupId", "messages": [ {"type": "text", "text": "Hello LINE Bot" } ] } ' https://api.line.me/v2/bot/message/push
  13. 13. New Messaging Type
  14. 14. New Message Type Buttons Template
  15. 15. { "type": "template", "altText": "this is an template", "template": { "type": buttons", "thumbnailImageUrl": "http://example.com/image.jpg", "title": "Current Weather…", "text": "9/29 Weather…", "actions": [{ "type": "message", "label": ”How about…", "text": "How about…" }, { "type": "uri", "label": ”Open Browser", "uri": "https://line.me" }] } }
  16. 16. { "type": "template", "altText": "this is an template", "template": { "type": buttons", "thumbnailImageUrl": "http://example.com/image.jpg", "title": "Current Weather…", ”text": "9/29 Weather…", "actions": [{ "type": "message", "label": ”How about…", "text": "How about…" }, { "type": "uri", "label": ”Open Browser", "uri": "https://line.me" }] } }
  17. 17. { "type": "template", "altText": "this is an template", "template": { "type": buttons", "thumbnailImageUrl": "http://example.com/image.jpg", "title": "Current Weather…", "text": "9/29 Weather…", "actions": [{ "type": "message", "label": ”How about…", "text": "How about…" }, { "type": "uri", "label": ”Open Browser", "uri": "https://line.me" }] } }
  18. 18. { "type": "template", "altText": "this is an template", "template": { "type": buttons", "thumbnailImageUrl": "http://example.com/image.jpg", "title": "Current Weather…", ”text": "9/29 Weather…", "actions": [{ "type": "message", "label": ”How about…", "text": "How about…" }, { "type": "uri", "label": ”Open Browser", "uri": "https://line.me" }] } }
  19. 19. New Message Type Confirm Template
  20. 20. { "type": "template", "altText": "this is an template", "template": { "type": “confirm”, "text": "Are you sure?", "actions": [{ "type": "message", "label": "OK", "text": "Yes, Please" }, { "type": "message", "label": ”Cancel", "text": "No thank you" }] } }
  21. 21. New Message Type Carousel Template
  22. 22. { "type": "template", "altText": "this is an template", "template": { "type": "carousel", "columns": [{ "thumbnailImageUrl”:"http://…", "title": "Current Whether…", ”text": "9/29 Whether…", "actions": [ ... ] }, { "thumbnailImageUrl”: "http://…", "title": "Current Whether…", "text": "9/30 Whether…", "actions": [ ... ] } ]} }
  23. 23. { "type": "template", "altText": "this is an template", "template": { "type": "carousel", "columns": [{ "thumbnailImageUrl”:"http://…", "title": "Current Whether…", ”text": "9/29 Whether…", "actions": [ ... ] }, { "thumbnailImageUrl”: "http://…", "title": "Current Whether…", "text": "9/30 Whether…", "actions": [ ... ] } ]} }
  24. 24. { "type": "template", "altText": "this is an template", "template": { "type": "carousel", "columns": [{ "thumbnailImageUrl”:"http://…", "title": "Current Whether…", ”text": "9/29 Whether…", "actions": [ ... ] }, { "thumbnailImageUrl”: "http://…", "title": "Current Whether…", "text": "9/30 Whether…", "actions": [ ... ] } ]} }
  25. 25. { "type": "template", "altText": "this is an template", "template": { "type": "carousel", "columns": [{ "thumbnailImageUrl”:"http://…", "title": "Current Whether…", ”text": "9/29 Whether…", "actions": [ ... ] }, { "thumbnailImageUrl”: "http://…", "title": "Current Whether…", "text": "9/30 Whether…", "actions": [ ... ] } ]} }
  26. 26. Now’s the Time to Begin Coding!!
  27. 27. Webhook LINE Chat (1-on-1 or group) LINE Server Bot Application LINE Message Your System Webhook LINE Chat (1-on-1 or group) Event { "events": […] }
  28. 28. event contact status “follow” “unfollow”“message” • Text • Image • Location • Sticker • Contact
  29. 29. event contact status “follow” “unfollow” group status “join” “leave” “beacon” “postback” “message” • Text • Image • Location • Sticker • Contact
  30. 30. Postback? Send Event to Your Server Directly with Parameters. { "replyToken": “xxxxxxxxxx", "type": "postback", "timestamp": 1462629479859, "source": { "type": "user", "userId": "xxxxxxxxxxxx" }, "postback": { "data": "action=remind&itemId=123", } } Bot Application Webhook
  31. 31. Let’s Implement Bot Server!!
  32. 32. Summary New Message API Added new Message Type Events that can be accepted via webhook Participation in groups New features added to Messaging API

×