getWebhookInfo
웹훅 정보를 반환합니다.
반환값: 성공 시 반환값: WebhookInfo.
매개변수
이 메서드에는 매개변수가 없습니다. 봇 토큰만 있으면 바로 호출할 수 있습니다.
요청 예제
curl
curl -s "https://api.telegram.org/bot$TOKEN/getWebhookInfo"
Python
import requests
TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.get(f"https://api.telegram.org/bot{TOKEN}/getWebhookInfo", timeout=30)
print(resp.json())
JavaScript
const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/getWebhookInfo`);
console.log(await res.json());
단계별 가이드: 텔레그램 웹훅 설정 가이드: setWebhook, secret_token, getWebhookInfo
관련 메서드
setWebhook웹훅을 설정합니다.deleteWebhook웹훅을 삭제합니다.getUpdates업데이트를 가져옵니다. Long Polling에는 '시작' 버튼을 사용하십시오.