setBusinessAccountProfilePhoto
İşletme hesabının profil fotoğrafı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 |
photo | InputProfilePhoto | Evet | Profil fotoğrafı (InputProfilePhoto) |
is_public | Boolean | İsteğe bağlı | Herkese açık fotoğraf — ana fotoğraf gizlilik ayarlarıyla gizlense bile görünür |
Örnek istek
curl
curl -s -X POST "https://api.telegram.org/bot$TOKEN/setBusinessAccountProfilePhoto" \
-H "Content-Type: application/json" \
-d '{
"business_connection_id": "BUSINESS_CONNECTION_ID",
"photo": {
"type": "static",
"photo": "attach://photo"
}
}'
Python
import requests
TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
f"https://api.telegram.org/bot{TOKEN}/setBusinessAccountProfilePhoto",
json={
"business_connection_id": "BUSINESS_CONNECTION_ID",
"photo": {
"type": "static",
"photo": "attach://photo"
}
},
timeout=30,
)
print(resp.json())
JavaScript
const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/setBusinessAccountProfilePhoto`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"business_connection_id": "BUSINESS_CONNECTION_ID",
"photo": {
"type": "static",
"photo": "attach://photo"
}
}),
});
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.setBusinessAccountNameİşletme hesabının adını ayarlar.setBusinessAccountUsernameİşletme hesabının kullanıcı adını ayarlar.setBusinessAccountBioİşletme hesabının biyografisini 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.