getAvailableGifts
Botun gönderebileceği hediyeleri döndürür.
Dönüş değeri: Başarılı olduğunda Gifts döndürür.
Parametreler
Bu metodun parametresi yok — bot token'ınızla doğrudan çağırmanız yeterli.
Örnek istek
curl
curl -s "https://api.telegram.org/bot$TOKEN/getAvailableGifts"
Python
import requests
TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.get(f"https://api.telegram.org/bot{TOKEN}/getAvailableGifts", timeout=30)
print(resp.json())
JavaScript
const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/getAvailableGifts`);
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.getUserGiftsKullanıcının hediyelerini döndürür.getChatGiftsSohbetin hediyelerini döndürür.