getUniqueGift
Benzersiz bir hediye hakkında adına göre bilgi döndürür (Bot API 10.4).
Dönüş değeri: Başarılı olduğunda UniqueGift döndürür.
Parametreler
| Parametre | Tür | Zorunlu | Açıklama |
|---|---|---|---|
name | String | Evet | Hediyenin benzersiz adı |
Örnek istek
curl
curl -s -X POST "https://api.telegram.org/bot$TOKEN/getUniqueGift" \
-H "Content-Type: application/json" \
-d '{"name":"PlushPepe-1"}'
Python
import requests
TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
f"https://api.telegram.org/bot{TOKEN}/getUniqueGift",
json={
"name": "PlushPepe-1"
},
timeout=30,
)
print(resp.json())
JavaScript
const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/getUniqueGift`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"name": "PlushPepe-1"
}),
});
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
sendInvoiceÖdeme için fatura gönderir.createInvoiceLinkÖdeme bağlantısı oluşturur.refundStarPaymentTelegram Stars ödemesini iade eder.sendGiftKullanıcıya veya sohbete hediye gönderir.getMyStarBalanceBotun Telegram Stars bakiyesini döndürür.getStarTransactionsBotun Telegram Stars işlemlerini döndürür.editUserStarSubscriptionTelegram Stars aboneliğini iptal eder veya yeniler.giftPremiumSubscriptionTelegram Premium aboneliği hediye eder.answerShippingQueryTeslimat sorgusunu yanıtlar.answerPreCheckoutQueryÖdeme öncesi sorguyu yanıtlar.getAvailableGiftsBotun gönderebileceği hediyeleri döndürür.getUserGiftsKullanıcının hediyelerini döndürür.