Skip to content

คัดลอก 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_here

WARNING

อย่า commit ไฟล์ .env ขึ้น Git ให้เพิ่ม .env ใน .gitignore เสมอ

พร้อมแล้ว!

นำ Keys ไปใช้งานใน project ได้เลย

LINE Developers Documentation