line messaging api workshop
TRANSCRIPT
![Page 1: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/1.jpg)
![Page 2: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/2.jpg)
Agenda: Day2 How to LINE ChatbotLINE@ vs LINE Chatbot
Workshop
• Setup LINE Developer Account
• LINE@ CMS Overview
• Setup your own LINE Chatbot
• LINE Chatbot RichMenu
• LINE Developer Dashboard
Lauch
Workshop: Developer your LINE Chatbot
• LINE User Profile
• LINE Messaging API v2 & Limitation
• LINE Webhooks (receive)
• LINE Push vs. Reply API (send)
• LINE Bot SDK
Implement Conversational Dialog Chatbot
How to Partnership with AIYA
Conclusion
![Page 3: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/3.jpg)
LINE Messaging APIBy MR. ATCHARIYA DAROTE
CEO & FOUDER AIYA
![Page 4: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/4.jpg)
Messaging API Overview
https://developers.line.me/messaging-api/overview
![Page 5: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/5.jpg)
Profile API
Profile Photo
Display Name
Status
Unique ID from LINE SystemU633424687c39c42833ca6f22f0931ca4
https://devdocs.line.me/en/#bot-api-get-profile
![Page 6: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/6.jpg)
Push API and Reply API
https://devdocs.line.me/en/#reply-message https://devdocs.line.me/en/#push-message
![Page 7: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/7.jpg)
1-on-1 and Group Chats
![Page 8: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/8.jpg)
Messaging Type
Text Video / Audio ImageMap Location
![Page 9: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/9.jpg)
Imagemap Message https://devdocs.line.me/en/#imagemap-message
![Page 10: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/10.jpg)
Template MessageButtons Confirm Carousel
https://devdocs.line.me/en/#template-messages
![Page 11: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/11.jpg)
Carousel Template Message
Max 5 Columns
![Page 12: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/12.jpg)
New! Template Message
Datetime pickersupported later than
LINE 7.9.0 for iOS and LINE 7.12.0. for Android.
Image carousel
![Page 13: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/13.jpg)
Rich Menu
![Page 14: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/14.jpg)
Rich Menu Example
![Page 15: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/15.jpg)
Rich Menu Example
![Page 16: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/16.jpg)
LINE Account TypeLINE@ Free LINE@ Account (Paid) LINE Official Account
![Page 17: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/17.jpg)
Pricing
![Page 19: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/19.jpg)
LINE@ API BETA: Term and Conditions
[Getting API] Selected account will be contacted by our agency[Prerequisites]Eligible account needs to apply for PRO+ packageValid API license document Only Approved account is eligible for this campaign
* This is a special campaign provided by LINE* API will be provided to LINE@ account. * API will be free of charge and valid up to 1 year.* LINE will not be responsible to the loss of account.* API cannot be resold and is solely for the use of the granted party.
![Page 20: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/20.jpg)
LINE@ Price Plan
![Page 22: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/22.jpg)
LINE Chatbot Getting Started
https://developers.line.me/messaging-api/getting-started
![Page 24: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/24.jpg)
![Page 25: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/25.jpg)
![Page 26: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/26.jpg)
![Page 27: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/27.jpg)
![Page 28: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/28.jpg)
Enable BOT API
![Page 29: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/29.jpg)
Messaging API Settings
![Page 30: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/30.jpg)
Add Friend
LINE@ ID
![Page 31: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/31.jpg)
Greeting Message
![Page 32: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/32.jpg)
Rich Menu
![Page 33: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/33.jpg)
Rich Menu
![Page 34: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/34.jpg)
Rich Menu
![Page 35: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/35.jpg)
Rich Menu
![Page 36: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/36.jpg)
ซ่อน Menu
![Page 37: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/37.jpg)
URL Tips
line://nv/locationShare Location
tel:0812345678Make call
![Page 38: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/38.jpg)
Setup your BOT Rich Menu
Hand-on Exercise 30 mins
![Page 39: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/39.jpg)
LINE Developer
![Page 40: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/40.jpg)
Webhook
require HTTPS only
![Page 41: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/41.jpg)
Example webhook event object
{ "timestamp": 1504984459576, "type": "follow", "source": { "type": "user", "userId": "U00f271c222b7351d508c1166ad2761c5" }, "replyToken": "f8e82cf0c7014437a67f86821b60c971" }
Follow event example Event object for when your account is added as a friend (or unblocked). You can reply to follow events.
![Page 42: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/42.jpg)
Example webhook event object
{ "timestamp": 1504984484798, "message": { "text": "Hello World", "type": "text", "id": "6672977550518" }, "type": "message", "source": { "type": "user", "userId": "U00f271c222b7351d508c1166ad2761c5" }, "replyToken": "009918233f36475daa24a1ebc0610804" }
Message event Event object which contains the sent message. The message field contains a message object which corresponds with the message type. You can reply to message events.
![Page 43: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/43.jpg)
Webhook
require HTTPS only
![Page 44: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/44.jpg)
Channel Access Token
![Page 45: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/45.jpg)
Test sending messages with the Messaging API
Hand-on Exercise 20 mins
![Page 46: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/46.jpg)
Hand-on Exercise 20 mins
![Page 47: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/47.jpg)
Hand-on Exercise 20 mins
Send mix message
https://devdocs.line.me/en/#send-message-object
![Page 48: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/48.jpg)
Hand-on Exercise 40 mins
Echo Bot
![Page 49: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/49.jpg)
LINE Bot SDKs
https://github.com/line/line-bot-sdk-python
![Page 50: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/50.jpg)
System Requirements
Python: https://www.python.org/ PIP: https://pip.pypa.io VirtualEnv: https://virtualenv.pypa.io
![Page 51: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/51.jpg)
LINE Bot SDKs
https://github.com/line/line-bot-sdk-python
git clone [email protected]:line/line-bot-sdk-python.gitcd line-bot-sdk-python virtualenv env (osx) source env/bin/activate (win) env/Scripts/activate.bat pip install -r examples/flask-echo/requirements.txt
python setup.py install
![Page 52: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/52.jpg)
Change channel_secret & channel_access_tokenModify examples/flask-echo/app.py
python examples/flask-echo/app.py
channel_secret = ‘e2f5aba3da22c686c27ea1a…’channel_access_token = ‘kl9CWhZVT+RtOsGobPwh1zblCp4BgW…’
![Page 53: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/53.jpg)
NGROK: Secure tunnels to localhost
Download and Installation
ngrok.com
Run in command line:
ngrok http 8000
Noted by Sahit’s A.I. Club Member: https://blog.sathit.me/ทำให้-localhost-ของเรา-online-ได้ง่ายๆ-ด้วย-ngrok-51d364564214
![Page 54: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/54.jpg)
Setup Webhook URL
https://XXXXXX.ngrok.io/callback
![Page 55: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/55.jpg)
NGROK: Inspecting your traffic
http://localhost:4040
![Page 56: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/56.jpg)
Hand-on Exercise 20 mins
Kitchensink Bot
python examples/flask-echo/app.py
![Page 58: LINE Messaging API Workshop](https://reader034.vdocuments.us/reader034/viewer/2022052216/5a64bc3f7f8b9a310b8b46f5/html5/thumbnails/58.jpg)
Q & A