Pre-requites installation
- docker
- docker-compose
# start mongo in docker firstly
make run
curl localhost:8080/health
# if you get response {"status":"ok"}, represent it work.
Receive message from line
- register web hook url, web hook endpoint will be
http://{endpoint}/webhook/line
- copy channel secret and access token to project/config.json
- restart server again
- Send message from your line
Send back message to customer
- you can get customerId from
- collection:
message
- field:
user_id
# curl http://localhost:8080/messaging/line -X POST -d '{"To": "Ue289fb7b4854f46458a934d286cb178d", "Text": "hello"}'
curl http://localhost:8080/messaging/line -X POST -d '{"To": "$customerId", "Text": "hello"}'
List messages of customer
curl http://localhost:8080/message/customer/{$customerId}
# curl http://localhost:8080/message/customer/Ue289fb7b4854f46458a934d286cb178d