forked from 4n0nymou3/Telegram-API-Proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
110 lines (93 loc) · 3.83 KB
/
index.html
File metadata and controls
110 lines (93 loc) · 3.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Telegram API Secure Gateway</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/atom-one-dark.min.css">
</head>
<body>
<div class="container">
<header>
<h1>Telegram API Secure Gateway</h1>
<div class="status-badge">
<div class="status-indicator"></div>
<span>System is Active</span>
</div>
</header>
<section class="info-section">
<h2>About This Service</h2>
<p>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.</p>
<div class="features">
<h3>Features:</h3>
<ul>
<li>Unlimited users and API requests</li>
<li>100% stability against network restrictions</li>
<li>Secure data transmission</li>
</ul>
</div>
</section>
<section class="usage-section">
<h2>How to Use</h2>
<p>Replace the standard Telegram API address with the following URL:</p>
<div class="api-container">
<div class="api-url" id="apiUrl">https://telegram-api-proxy-anonymous.pages.dev/api/bot</div>
<button class="copy-button" onclick="copyToClipboard()">Copy URL</button>
</div>
</section>
<section class="code-examples">
<h2>Code Examples</h2>
<div class="code-tabs">
<button class="tab-button active" onclick="switchTab('js')">JavaScript</button>
<button class="tab-button" onclick="switchTab('python')">Python</button>
</div>
<div class="tab-content active" id="js-tab">
<pre><code class="language-javascript">
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");
}
}
</code></pre>
</div>
<div class="tab-content" id="python-tab">
<pre><code class="language-python">
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!")
</code></pre>
</div>
</section>
<footer>
<p>Created by: <a href="https://t.me/BXAMbot" target="_blank">Anonymous</a></p>
<p>License: <a href="https://github.com/username/Telegram-API-Proxy/blob/main/LICENSE" target="_blank">GPL-3.0</a></p>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>