Telegram Bot API
🌐 Türkçe

editMessageLiveLocation

Kategori: Düzenleme · Bot API 10.3 · Resmi dokümantasyon

Canlı konumu düzenler.

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

Parametreler

ParametreTürZorunluAçıklama
business_connection_idStringİsteğe bağlıİşletme bağlantısı ID'si
chat_idInteger or Stringİsteğe bağlıSohbet ID'si
message_idIntegerİsteğe bağlıMesaj ID'si
inline_message_idStringİsteğe bağlıSatır içi mesaj ID'si
latitudeFloatEvetEnlem
longitudeFloatEvetBoylam
live_periodIntegerİsteğe bağlıCanlı konum süresi (saniye)
horizontal_accuracyFloatİsteğe bağlıDoğruluk (metre, 0-1500)
headingIntegerİsteğe bağlıYön (derece, 1-360)
proximity_alert_radiusIntegerİsteğe bağlıYakınlık uyarısı yarıçapı (1-100000)
reply_markupInlineKeyboardMarkupİsteğe bağlıJSON: InlineKeyboardMarkup

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/editMessageLiveLocation" \
  -H "Content-Type: application/json" \
  -d '{"latitude":51.5007,"longitude":-0.1246}'

Python

import requests

TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
    f"https://api.telegram.org/bot{TOKEN}/editMessageLiveLocation",
    json={
        "latitude": 51.5007,
        "longitude": -0.1246
    },
    timeout=30,
)
print(resp.json())

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/editMessageLiveLocation`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "latitude": 51.5007,
    "longitude": -0.1246
  }),
});
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