This is a template to help you if you want to implement Line Notify. It help us follow:
- Authenication with Line Notify server
- Help you to access token from Line Notify server
- A notify entry point to notify Line Notify server
You can just try it or fork this repo to developing your own Line Notify server in Go.
- Click this button and remember to login your Line account for authenication this notify.
- Select one on one notification, click "Agreed and Connected"
- It will help you to add friend with "Line Notify".
- Go to this link add arbitrary string after msg=xxxx ex: https://linenotify-app.herokuapp.com/notify?msg=test
Register your Line Notify Account
- You need to fill all related info you need.
- For "Service Site" and "Callback URL", just fill arbitrary web site with "http://xxx.xxx.com"
- Remember you need "Client ID" and "Client Secret" for Heroku setup.
Remember your heroku ID.
Please config three variables as follow:
CallbackURL
: Callback URL which should behttps://YOUR_HEROKU_APPID.herokuapp.com/callback
ClientID
: Client ID from Line Notify pageClientSecret
: Client Secret from Line Notify page
This is example of my heroku settup.
In your fork repo, path
git remote add heroku https://git.heroku.com/YOUR_ID.git
- Update
govendor
setting.- Install govendor
go get -u github.com/kardianos/govendor
- Update root path
rm -Rf vendor
govendor init
- Install govendor
git push -u heroku HEAD
If you want to implement business Line Notify service, you will need implement followsing after this repo.
- Implement a database service to store all users'
token
andcode
. - Because Heroku server will
force to shudown 6 hours per day
, you will need to implement a dedicate server to notify Line Notify service once the notification happen anytime.
If you still have any questions, please file your issue and let me know.