Telegram Bot API
🌐 한국어

editMessageLiveLocation

카테고리: 수정 · Bot API 10.3 · 공식 문서

실시간 위치를 수정합니다.

반환값: 성공 시 반환값: Message or True.

매개변수

매개변수타입필수설명
business_connection_idString선택비즈니스 연결 ID
chat_idInteger or String선택채팅 ID
message_idInteger선택메시지 ID
inline_message_idString선택인라인 메시지 ID
latitudeFloat예위도
longitudeFloat예경도
live_periodInteger선택실시간 위치 공유 시간(초)
horizontal_accuracyFloat선택정확도(미터, 0-1500)
headingInteger선택이동 방향(도, 1-360)
proximity_alert_radiusInteger선택근접 알림 반경 (1-100000)
reply_markupInlineKeyboardMarkup선택InlineKeyboardMarkup JSON 객체

매개변수 설명은 핵심만 간추린 요약입니다. 전체 설명은 공식 문서에서 확인할 수 있습니다.

요청 예제

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());

단계별 가이드: 텔레그램 봇 만들기: @BotFather로 생성하고 첫 메시지 보내기