
telegram client
一个简单的 Telegram 认证工具,支持保存会话文件。
Repository Info
About This Server
一个简单的 Telegram 认证工具,支持保存会话文件。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Telegram Authentication Client
A simple application that authenticates with Telegram, saves a session file, and exits.
Prerequisites
- You need to have Go installed (version 1.18 or later).
- You need to obtain Telegram API credentials:
- Visit my.telegram.org/apps
- Create a new application
- Note your
app_idandapp_hash
Usage
Using Command-Line Flags
go run main.go --app-id=YOUR_APP_ID --app-hash=YOUR_APP_HASH --phone=YOUR_PHONE_NUMBER
For example:
go run main.go --app-id=12345 --app-hash=abcdef1234567890abcdef --phone=+1234567890
Using Environment Variables
export APP_ID=YOUR_APP_ID
export APP_HASH=YOUR_APP_HASH
export PHONE=YOUR_PHONE_NUMBER
go run main.go
Optional Parameters
--session-file: Path to the session file (default: "tg-session.json" in the current directory)
What This Does
- Connects to Telegram using your API credentials
- Requests an authentication code to be sent to your phone
- Asks you to enter the code you received
- Authenticates with Telegram
- Saves the session file to the specified path
- Exits
The session file can be used for subsequent authentication without needing to enter a code again.
Notes
- Phone number should be in international format (e.g., +1234567890)
- If you have two-factor authentication enabled, this application will handle it properly
- The session file contains sensitive authentication information, keep it secure
Quick Start
Clone the repository
git clone https://github.com/idushes/telegram-clientInstall dependencies
cd telegram-client
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.