https://github.com/louis70109/webhooker
Set LINE bot webhook by Bottender
https://github.com/louis70109/webhooker
Last synced: 2 months ago
JSON representation
Set LINE bot webhook by Bottender
- Host: GitHub
- URL: https://github.com/louis70109/webhooker
- Owner: louis70109
- Created: 2020-10-09T15:24:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-23T08:33:20.000Z (over 4 years ago)
- Last Synced: 2025-01-31T22:11:22.571Z (4 months ago)
- Language: JavaScript
- Size: 159 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Webhooker
Webhooker is implemented for [LINE webhook API](https://developers.line.biz/en/news/2020/10/06/messaging-api-update-october-2020/).
> Group/Room/User id is saved in memory currently, refresh or sleep(e.g. Heroku) will be clean.
## Environment variables
```bash
cp .env.example .env
```### Modify `.env`
- Login LINE Developer Console.
- Create a Messaging API channel.
- Input channel information.
- Copy Channel secret and Channel access token for environment `LINE_ACCESS_TOKEN` and `LINE_CHANNEL_SECRET` variables.## `npm run dev`
You would get a webhook url and you need to copy it to your LINE Bot webhook url column.
Then you could test Webhooker. 🙂
## Trigger event
- set {BOT_CHANNEL_TOKEN}
- get
- url {WEBHOOK_URL}## `npm start`
Runs the app in production mode.
By default, server runs on [http://localhost:5000](http://localhost:5000).```sh
npm start
yarn start
```## Heroku
- Fork and clone this project.
- Run `Heroku create` to build a machine.
- git push heroku master.
- Set your Channel's `LINE_ACCESS_TOKEN` and `LINE_CHANNEL_SECRET` into `Settings`➡️ `Reveal Config Vars`.
- Enjoy it!## License
MIT