Register a Discord channel
ສະຖານະການ: You want new orders posted in #orders
POST /v1/discord/webhooks
{
"ref": "orders-room",
"url": "https://discord.com/api/webhooks/123/abc…"
}
➡️ Name it once with ref and use it forever
API v1 · ອັບເດດລ່າສຸດ: ເວລາປະເທດໄທ (UTC+07:00)
https://tungkao.com · https://api.tungkao.com/docs
ຕ້ອງສະແດງ “Powered by TUNGKAO” ເປັນລິ້ງໄປ https://tungkao.com ໃນໜ້າທີ່ໃຊ້ບໍລິການ
discord_notifyສົ່ງຂໍ້ຄວາມເຂົ້າຫ້ອງ Discord ຂອງທ່ານ ຫຼື ລູກຄ້າ ເຊັ່ນ ແຈ້ງອໍເດີໃໝ່ໃຫ້ທີມ
🕒 ອັບເດດລ່າສຸດ: ເວລາປະເທດໄທ (UTC+07:00) · ✅ ໂຄດເດີມໃຊ້ໄດ້ ບໍ່ຕ້ອງແກ້
ສຳເນົາລິ້ງນີ້ໃຫ້ AI ອ່ານ ຫຼື ກົດປຸ່ມ ລະບົບຈະສຳເນົາຄຳສັ່ງ ແລະ ເປີດ AI ໃຫ້
https://api.tungkao.com/docs/api/discord_notify.md?lang=lohttps://api.tungkao.com/changelog/discord_notify.jsonລິ້ງນີ້ສົ່ງລາຍການອັບເດດຂອງ API ນີ້ເປັນ JSON (ບໍ່ຕ້ອງໃຊ້ key ເປີດໄດ້ທຸກໂດເມນ) ໃຫ້ໜ້າຫຼັງບ້ານສະແດງເປັນກ່ອງ “ປະກາດອັບເດດ” ແລະ ຂຶ້ນ “ໃໝ່” ເມື່ອ last_updated ປ່ຽນ
ສຳເນົາ + ເປີດໃນ: ກົດປຸ່ມ AI ລະບົບຈະສຳເນົາຄຳສັ່ງໃຫ້ ຖ້າຊ່ອງແຊັດວ່າງ ໃຫ້ວາງໄດ້ເລີຍ
ສ້າງ key ບໍລິການ discord_notify ທີ່ໜ້າຮ້ານ (ເມນູ API key) ແລ້ວສົ່ງທຸກຄຳຂໍດ້ວຍ header ດ້ານລຸ່ມ — key ບໍລິການອື່ນໃຊ້ກັບ API ນີ້ບໍ່ໄດ້
Authorization: Bearer $TUNGKAO_KEY/v1/discord/webhookscurl -X POST https://api.tungkao.com/v1/discord/webhooks \
-H "Authorization: Bearer $TUNGKAO_KEY" \
-H "Content-Type: application/json" \
-d '{"ref":"orders-room","url":"https://discord.com/api/webhooks/123/abc…"}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/discord/webhooks", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"ref": "orders-room",
"url": "https://discord.com/api/webhooks/123/abc…"
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/discord/webhooks");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"ref" => "orders-room",
"url" => "https://discord.com/api/webhooks/123/abc…"
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/discord/webhooks",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"ref": "orders-room",
"url": "https://discord.com/api/webhooks/123/abc…"
},
timeout=30,
)
print(r.json())/v1/discord/sendcurl -X POST https://api.tungkao.com/v1/discord/send \
-H "Authorization: Bearer $TUNGKAO_KEY" \
-H "Content-Type: application/json" \
-d '{"ref":"orders-room","text":"🛒 New order #1001 — 590 THB"}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/discord/send", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"ref": "orders-room",
"text": "🛒 New order #1001 — 590 THB"
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/discord/send");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"ref" => "orders-room",
"text" => "🛒 New order #1001 — 590 THB"
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/discord/send",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"ref": "orders-room",
"text": "🛒 New order #1001 — 590 THB"
},
timeout=30,
)
print(r.json())ສະຖານະການ: You want new orders posted in #orders
POST /v1/discord/webhooks
{
"ref": "orders-room",
"url": "https://discord.com/api/webhooks/123/abc…"
}
➡️ Name it once with ref and use it forever
ສະຖານະການ: Order #1001 for 590 THB comes in
POST /v1/discord/send
{
"ref": "orders-room",
"text": "🛒 New order #1001 — 590 THB"
}
➡️ The message appears in the channel right away
ສະຖານະການ: You want the sender to show as “Shop Bot”
POST /v1/discord/send
{
"ref": "orders-room",
"text": "Daily sales: 12,400 THB",
"username": "Shop Bot"
}
➡️ The message shows Shop Bot as the sender
ສະຖານະການ: Notify both the admin and the stock channels
POST /v1/discord/send
{
"refs": [
"admin-room",
"stock-room"
],
"text": "Stock low: T-shirt size M"
}
➡️ Posted to every listed channel
ສະຖານະການ: You want to see which messages failed
GET /v1/discord/messages
➡️ Returns each message with its status
✅ ໂຄດເດີມໃຊ້ໄດ້ ບໍ່ຕ້ອງແກ້
ກວດໄດ້ຕະຫຼອດວ່າ API ປົກກະຕິບໍ່ ບໍ່ຕ້ອງໃຊ້ key
GET https://api.tungkao.com/status
curl https://api.tungkao.com/status{
"success": true,
"data": {
"status": "ok",
"services": [
{ "id": "slip_verify", "status": "ok", "routes": ["ok", "ok", "busy"] },
{ "id": "slip_deposit", "status": "ok", "routes": ["ok", "ok", "busy"] },
{ "id": "login", "status": "ok" },
{ "id": "telegram", "status": "ok" },
{ "id": "discord", "status": "ok" },
{ "id": "email", "status": "busy" },
{ "id": "crypto", "status": "ok" },
{ "id": "core", "status": "ok" }
],
"paused": [],
"updated_at": "2026-11-14T12:00:00.000Z"
}
}Powered by TUNGKAO