Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
A Python Telegram API Library for converting between tdata and telethon sessions, with built-in official Telegram APIs.
A Python Telegram API Library for converting between tdata and telethon sessions, with built-in official Telegram APIs. Read the documentation.
tdata
.pip install --upgrade opentele
Load TDesktop from tdata folder and convert it to telethon, with a custom API:
from opentele.td import TDesktop
from opentele.tl import TelegramClient
from opentele.api import API, CreateNewSession, UseCurrentSession
import asyncio
async def main():
# Load TDesktop client from tdata folder
tdataFolder = r"C:\Users\<username>\AppData\Roaming\Telegram Desktop\tdata"
tdesk = TDesktop(tdataFolder)
# Using official iOS API with randomly generated device info
# print(api) to see more
api = API.TelegramIOS.Generate()
# Convert TDesktop session to telethon client
# CreateNewSession flag will use the current existing session to
# authorize the new client by `Login via QR code`.
client = await tdesk.ToTelethon("newSession.session", CreateNewSession, api)
# Although Telegram Desktop doesn't let you authorize other
# sessions via QR Code (or it doesn't have that feature),
# it is still available across all platforms (APIs).
# Connect and print all logged in devices
await client.connect()
await client.PrintSessions()
asyncio.run(main())
opentele offers the ability to use official APIs, which are used by official apps. You can check that out here.
According to Telegram TOS: all accounts that sign up or log in using unofficial Telegram API clients are automatically put under observation to avoid violations of the Terms of Service.
It also uses the lang_pack parameter, of which telethon can't use because it's for official apps only.
Therefore, there are no differences between using opentele and official apps, the server can't tell you apart.
The best way to learn anything is by looking at the examples. Am I right?
FAQs
A Python Telegram API Library for converting between tdata and telethon sessions, with built-in official Telegram APIs.
We found that opentele demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.