Telegram Bot API
🌐 Türkçe

setBusinessAccountName

Kategori: Business · Bot API 10.3 · Resmi dokümantasyon

İşletme hesabının adını ayarlar.

Dönüş değeri: Başarılı olduğunda True döndürür.

Parametreler

ParametreTürZorunluAçıklama
business_connection_idStringEvetİşletme bağlantısı ID'si
first_nameStringEvetAd (1-64)
last_nameStringİsteğe bağlıSoyadı (0-64)

Parametre açıklamaları kısa özetlerdir; tam metin için resmi dokümantasyona bakın.

Ö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