คัดลอก Keys
หลังสร้าง Messaging API Channel แล้ว ให้คัดลอก Keys เหล่านี้เก็บไว้
| Key | หาได้จาก |
|---|---|
Channel secret | แท็บ Basic settings → Channel secret |
Channel access token | แท็บ Messaging API → Channel access token |
ใส่ใน .env
bash
# Basic settings tab
LINE_CHANNEL_SECRET=your_channel_secret_here
# Messaging API tab
LINE_CHANNEL_TOKEN=your_channel_access_token_hereWARNING
อย่า commit ไฟล์ .env ขึ้น Git ให้เพิ่ม .env ใน .gitignore เสมอ
พร้อมแล้ว!
นำ Keys ไปใช้งานใน project ได้เลย
