TUNGKAO API စာရွက်စာတမ်း
API · telegram_notify

Telegram အသိပေးချက်

TUNGKAO ဘော့ဖြင့် အသုံးပြုသူများထံ Telegram စာပို့ — ကိုယ်ပိုင်ဘော့မလို။ ဥပမာ ငွေဝင်၊ အော်ဒါအခြေအနေ၊ OTP

🕒 နောက်ဆုံးအပ်ဒိတ်: ထိုင်းစံတော်ချိန် (UTC+07:00) · ✅ ကုဒ်ဟောင်း ဆက်သုံးနိုင်

🤖 AI ဖြင့် ချိတ်ဆက်ကုဒ်ရေးခိုင်းရန်

ဤလင့်ခ်ကို AI ဖတ်ရန် ကူးပါ သို့မဟုတ် ခလုတ်နှိပ်ပါ — prompt ကူးပြီး AI ဖွင့်ပေးမည်

https://app.tungkao.com/docs/api/telegram_notify.md?lang=my
https://api.tungkao.com/changelog/telegram_notify.json

ဤလင့်ခ်သည် ဤ API ၏ အပ်ဒိတ်များကို JSON ဖြင့် ပြန်ပေးသည် (key မလို၊ မည်သည့် domain မှမဆို)။ admin စာမျက်နှာတွင် “အပ်ဒိတ်ကြေညာချက်” ဘောက်စ်အဖြစ်ပြပြီး last_updated ပြောင်းလျှင် “အသစ်” ပြပါ

ChatGPT ↗Claude ↗Gemini ↗Grok ↗

ကူး + ဖွင့်ရန်: AI ခလုတ်နှိပ်လျှင် prompt ကို အလိုအလျောက်ကူးပေးသည်၊ chat အကွက်လွတ်နေလျှင် paste လုပ်ပါ

🔑 သုံးရမည့် key

ကုန်သည်ပေါ်တယ် (API key) တွင် telegram_notify key ဖန်တီး၍ request တိုင်းတွင် ဤ header ပို့ပါ — အခြား service ၏ key များ ဤနေရာတွင် အလုပ်မလုပ်

Authorization: Bearer $TUNGKAO_KEY

📋 အဆင့်များ

  1. ref is your own name for a recipient (use your member id, e.g. member-1001): A-Z a-z 0-9 _ . : @ - up to 128 chars. Every call refers to the recipient by this ref.
  2. Add a recipient: your server calls POST /v1/telegram/link {ref} → gets data.url (a t.me/…?start=… link) → show it as a “Connect Telegram” button on the member's profile page (valid 30 minutes, single use; request again any time).
  3. The member opens the link → presses Start in Telegram → the bot confirms (Telegram does not let a bot message someone who never pressed Start, so this step cannot be skipped).
  4. Check the connection: GET /v1/telegram/recipients (status = active) — use it to switch your button to “Connected ✓”.
  5. Send: POST /v1/telegram/send with one ref or up to 100 refs; bold text (parse_mode: HTML) and a link button are supported. Per-recipient results are in data.results: sent / not_linked / failed.
  6. Remove a recipient: DELETE /v1/telegram/recipients/{ref}. Members can also send /stop to the bot. If a member blocks the bot, that recipient is paused until they connect again.
  7. Try it without code: TUNGKAO API key page → this key's card → “Set up notifications” has a create-link button (with QR) and a send-test button.

📡 API ခေါ်ဆိုမှု + ကုဒ်နမူနာ

POST/v1/telegram/link
curl -X POST https://api.tungkao.com/v1/telegram/link \
  -H "Authorization: Bearer $TUNGKAO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref":"member-1001"}'
POST/v1/telegram/send
curl -X POST https://api.tungkao.com/v1/telegram/send \
  -H "Authorization: Bearer $TUNGKAO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref":"member-1001","text":"<b>Payment received</b> 500 THB","parse_mode":"HTML","button":{"text":"View order","url":"https://yourshop.com/orders/1"}}'
GET/v1/telegram/messages
curl -X GET https://api.tungkao.com/v1/telegram/messages \
  -H "Authorization: Bearer $TUNGKAO_KEY"

📚 အသုံးပြုပုံ ဥပမာများ

ဥပမာ 1

Let a member connect Telegram

အခြေအနေ: Member member-1001 wants notifications on Telegram

တောင်းဆိုချက်
POST /v1/telegram/link
{
  "ref": "member-1001"
}
နမူနာ တုံ့ပြန်ချက်
{
  "success": true,
  "data": {
    "url": "https://t.me/…?start=…"
  }
}

➡️ Give the member the link to tap (valid 30 minutes, once)

ဥပမာ 2

Notify a payment

အခြေအနေ: 500 THB arrived and you want to notify the member

တောင်းဆိုချက်
POST /v1/telegram/send
{
  "ref": "member-1001",
  "text": "<b>Payment received</b> 500 THB",
  "parse_mode": "HTML"
}

➡️ The member gets the message in Telegram right away

ဥပမာ 3

Message with a link button

အခြေအနေ: You want a button to open the order

တောင်းဆိုချက်
POST /v1/telegram/send
{
  "ref": "member-1001",
  "text": "Order #1001 shipped",
  "button": {
    "text": "View order",
    "url": "https://yourshop.com/orders/1001"
  }
}

➡️ A button under the message opens the link

ဥပမာ 4

Notify several members at once

အခြေအနေ: Announce a promotion to three members

တောင်းဆိုချက်
POST /v1/telegram/send
{
  "refs": [
    "member-1001",
    "member-1002",
    "member-1003"
  ],
  "text": "New promotion today"
}

➡️ Sent to each member; check results with GET /v1/telegram/messages

ဥပမာ 5

A member stops notifications

အခြေအနေ: The member asks to disconnect

တောင်းဆိုချက်
DELETE /v1/telegram/recipients/member-1001

➡️ The link is removed; no more messages are sent

💡 နောက်ထပ်

📜 ဤ API ၏ အပ်ဒိတ်မှတ်တမ်း

  1. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    API update announcements by webhook: new api.update event (opt in per key on the key card; off by default)
  2. စာရွက်စာတမ်း ထိုင်းစံတော်ချိန် (UTC+07:00)
    Telegram / Discord notifications: step-by-step setup guide on the key card and in the docs (Telegram connect link, add a Discord channel webhook)
  3. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    error.user_message: ready-to-show text for end users on outages, no credits or key problems (white-label keys omit tungkao.com)
  4. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    GET /status: ဝန်ဆောင်မှုအလိုက် API အခြေအနေ (key မလို)
  5. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    key ဖွင့်/ပိတ် ခလုတ်နှင့် ပြောင်းချိန် + ဝက်ဘ်ဆိုက်တစ်ခု ဝန်ဆောင်မှုတစ်ခုလျှင် key ၁ ခု
  6. တိုးတက် ထိုင်းစံတော်ချိန် (UTC+07:00)
    API v1 ကိုအမြဲပိတ် (ထပ်ထည့်ရုံသာ) + X-Tungkao-Api-Version header + ၁၂ လကြိုတင်အသိပေး
  7. စာရွက်စာတမ်း ထိုင်းစံတော်ချိန် (UTC+07:00)
    API တစ်ခုချင်း docs စာမျက်နှာ + AI လင့်ခ် (ဘာသာ ၁၀)
  8. လုံခြုံရေး ထိုင်းစံတော်ချိန် (UTC+07:00)
    API key တစ်ခုချင်း domain အတည်ပြု (key 1 = site 1) — key ဟောင်းများ ဆက်သုံးနိုင်
  9. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    HMAC request လက်မှတ် (ရွေးချယ်) — မဖွင့်လျှင် ဘာမှမပြောင်း
  10. အသစ် ထိုင်းစံတော်ချိန် (UTC+07:00)
    Telegram နှင့် Discord အသိပေးချက် စတင်
  11. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    API key သက်တမ်း + သတိပေး + သက်တမ်းတိုး — key စာသားမပြောင်း
  12. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    service တိုင်းအတွက် test mode key (ပုံတူ၊ အခမဲ့)

✅ ကုဒ်ဟောင်း ဆက်သုံးနိုင်

🛡️ တည်ငြိမ်မှုကတိ: တစ်ကြိမ်ချိတ် အမြဲသုံး

🚦 စနစ်အခြေအနေ (GET /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"
  }
}

🏷️ TUNGKAO credit ပြသရန် စည်းကမ်း

Powered by TUNGKAO