前置準備

需要以下帳號:


Step 1:建立 Line Bot

  1. 前往 Line Developers → Console

  2. 建立 Provider(如果還沒有的話)

    image.png

  3. 選擇 Provider → 建立新 Channel → 選 Messaging API

    image.png

    image.png

    image.png

  4. 連結到 Line Official Account 頁面,填入 Channel 名稱、描述、類別等必填資訊

    image.png

    image.png

    image.png

    image.png

    image.png

  5. 回到 Line Developers Console,會看到已經新增一個 Channel

    (註:這個頭像是剛剛在 Line Official Account 頁面設定的)

    image.png

  6. 建立完成後,記錄以下兩個值:

  7. 在 Messaging API 頁面:


Step 2:建立 GitHub Repo

  1. 在 GitHub 建立新 Repo(例如 line-clock-bot
  2. 將專案解壓縮後推上去:
git init
git add .
git commit -m "init"
git remote add origin <https://github.com/你的帳號/line-clock-bot.git>
git push -u origin main