setBusinessAccountName
İşletme hesabının adını ayarlar.
Dönüş değeri: Başarılı olduğunda True döndürür.
Parametreler
| Parametre | Tür | Zorunlu | Açıklama |
|---|---|---|---|
business_connection_id | String | Evet | İşletme bağlantısı ID'si |
first_name | String | Evet | Ad (1-64) |
last_name | String | İsteğe bağlı | Soyadı (0-64) |
Örnek istek
curl
curl -s -X POST "https://api.telegram.org/bot$TOKEN/setBusinessAccountName" \
-H "Content-Type: application/json" \
-d '{
"business_connection_id": "BUSINESS_CONNECTION_ID",
"first_name": "Alice"
}'
Python
import requests
TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
f"https://api.telegram.org/bot{TOKEN}/setBusinessAccountName",
json={
"business_connection_id": "BUSINESS_CONNECTION_ID",
"first_name": "Alice"
},
timeout=30,
)
print(resp.json())
JavaScript
const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/setBusinessAccountName`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"business_connection_id": "BUSINESS_CONNECTION_ID",
"first_name": "Alice"
}),
});
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
getBusinessAccountStarBalanceİşletme hesabının Stars bakiyesini döndürür.getBusinessAccountGiftsİşletme hesabının hediyelerini döndürür.transferBusinessAccountStarsStars'ı işletme hesabından bot bakiyesine aktarır.readBusinessMessageİşletme hesabı adına gelen mesajı okundu olarak işaretler.deleteBusinessMessagesİşletme hesabı adına mesajları siler.setBusinessAccountUsernameİşletme hesabının kullanıcı adını ayarlar.setBusinessAccountBioİşletme hesabının biyografisini ayarlar.setBusinessAccountProfilePhotoİşletme hesabının profil fotoğrafını ayarlar.removeBusinessAccountProfilePhotoİşletme hesabının profil fotoğrafını kaldırır.setBusinessAccountGiftSettingsİşletme hesabının hediye ayarlarını yapılandırır.