Welcome to the Telegram API Secure Proxy Service. This gateway provides stable and reliable access to the Telegram API in regions where it may be restricted.
Replace the standard Telegram API address with the following URL:
const Http = new XMLHttpRequest();
let botToken = "YOUR_BOT_TOKEN"
let ChatID = "YOUR_CHAT_ID"
let txtmessage = "Hello from Secure API"
var url = 'https://telegram-api-proxy-anonymous.pages.dev/api/bot' + botToken +
'/sendMessage?text=' + txtmessage +
'&chat_id=' + ChatID +
"&parse_mode=Markdown&disable_web_page_preview=True";
Http.open("GET", url);
Http.send();
Http.onreadystatechange = function() {
if(this.readyState == 4 && this.status == 200) {
console.log("Message sent successfully");
}
}
import requests
def send_telegram_msg(msg):
token = "YOUR_BOT_TOKEN"
chat_id = "YOUR_CHAT_ID"
url = "https://telegram-api-proxy-anonymous.pages.dev/api/bot" + token + "/sendMessage"
payload = {
"text": msg,
"chat_id": chat_id,
"parse_mode": "Markdown",
"disable_web_page_preview": True
}
response = requests.get(url, params=payload)
return response.json()
user_msg = input("Please enter your message: ")
result = send_telegram_msg(user_msg)
print("Message sent successfully!")