answerChatJoinRequestQuery
Sohbete katılma isteği sorgusunu yanıtlar (Bot API 10.1).
Dönüş değeri: Başarılı olduğunda True döndürür.
Parametreler
| Parametre | Tür | Zorunlu | Açıklama |
|---|---|---|---|
chat_join_request_query_id | String | Evet | Katılma isteği sorgusu ID'si |
result | String | Evet | Sonuç: approve, decline veya queue |
Örnek istek
curl
curl -s -X POST "https://api.telegram.org/bot$TOKEN/answerChatJoinRequestQuery" \
-H "Content-Type: application/json" \
-d '{"chat_join_request_query_id":"QUERY_ID","result":"approve"}'
Python
import requests
TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
f"https://api.telegram.org/bot{TOKEN}/answerChatJoinRequestQuery",
json={
"chat_join_request_query_id": "QUERY_ID",
"result": "approve"
},
timeout=30,
)
print(resp.json())
JavaScript
const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/answerChatJoinRequestQuery`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"chat_join_request_query_id": "QUERY_ID",
"result": "approve"
}),
});
console.log(await res.json());
Adım adım rehber: Telegram bot nasıl yapılır? BotFather ile adım adım bot oluşturma
İlgili metotlar
answerCallbackQueryCallback sorgusunu yanıtlar.answerInlineQuerySatır içi sorguyu yanıtlar.answerGuestQueryMisafir sorgusunu yanıtlar - misafir modu (Bot API 10.0).answerWebAppQueryWeb App etkileşiminin sonucunu gönderir.sendChatJoinRequestWebAppSohbete katılma isteği sorgusu için Mini App gösterir (Bot API 10.1).