LINE new API - Icon Switch: this API can change icon and display name in same LINE BOT
This bot will catch trigger text to change name and avatar !!🎉
- Sally
- Brown
- Cony
-
Got A LINE Bot API devloper account Make sure you already registered, if you need use LINE Bot.
-
Go to LINE Developer Console
- Close auto-reply setting on "Messaging API" Tab.
- Setup your basic account information. Here is some info you will need to know.
- Callback URL:
https://{NGROK_URL}/webhooks/line
- Verify your webhook.
- Callback URL:
-
You will get following info, need fill back to
.env
file.- Channel Secret
- Channel Access Token (You need to issue one here)
- first terminal window
pip install -r requirements.txt --user
python api.py
[2020/03/28] LINE just not already release tag in SDK, so I use git method to install NEW feature package(icon switch).
- Create a provisional Https:
ngrok http 5000
or maybe you have npm enviroment:
npx ngrok http 5000
- Copy url to LINE Developer Console
- Install serverless via npm:
$ npm install -g serverless
- Setup your AWS ceritficate
export AWS_ACCESS_KEY_ID=<your-key-here>
export AWS_SECRET_ACCESS_KEY=<your-secret-key-here>
- Deploy the example:
npm install
pip install -r requirements.txt --user
serverless wsgi serve # local testing
serverless deploy # deploy to AWS
- If deploy, copy the url to LINE Developer Console
MIT License