
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Modern asynchronous Python library for interacting with the REGHelp Key API. It supports all services: Push tokens, Email, Integrity, Turnstile, VoIP Push and Recaptcha Mobile.
async
/await
support powered by httpx
.get_integrity_token(..., token_type="std")
.AppDevice
, IntegrityStatusResponse
, VoipStatusResponse
, IntegrityTokenType
directly from package root.get_integrity_token()
now uses keyword-only parameters for new options while remaining backward compatible.pip install reghelp-client
For development:
pip install "reghelp-client[dev]"
import asyncio
from reghelp_client import RegHelpClient, AppDevice, EmailType
async def main():
async with RegHelpClient("your_api_key") as client:
# Check balance
balance = await client.get_balance()
print(f"Balance: {balance.balance} {balance.currency}")
# Get Telegram iOS push token
task = await client.get_push_token(
app_name="tgiOS",
app_device=AppDevice.IOS
)
print(f"Push token: {task.token}")
# Wait for result
result = await client.wait_for_result(task.id, "push")
print(f"Push token: {result.token}")
if __name__ == "__main__":
asyncio.run(main())
Современная асинхронная Python библиотека для работы с REGHelp Key API. Поддерживает все сервисы: Push tokens, Email, Integrity, Turnstile, VoIP Push, Recaptcha Mobile.
token_type="std"
в методе get_integrity_token()
.AppDevice
, IntegrityStatusResponse
, VoipStatusResponse
, IntegrityTokenType
из корневого пакета.get_integrity_token()
использует keyword-only параметры для новых опций, сохраняя совместимость с существующим кодом.pip install reghelp-client
Или для разработки:
pip install reghelp-client[dev]
import asyncio
from reghelp_client import RegHelpClient, AppDevice, EmailType
async def main():
async with RegHelpClient("your_api_key") as client:
# Проверить баланс
balance = await client.get_balance()
print(f"Баланс: {balance.balance} {balance.currency}")
# Получить push токен для Telegram iOS
task = await client.get_push_token(
app_name="tgiOS",
app_device=AppDevice.IOS
)
print(f"Задача создана: {task.id}")
# Ждать результат
result = await client.wait_for_result(task.id, "push")
print(f"Push токен: {result.token}")
if __name__ == "__main__":
asyncio.run(main())
from reghelp_client import RegHelpClient
# Базовое использование
client = RegHelpClient("your_api_key")
# С кастомными настройками
client = RegHelpClient(
api_key="your_api_key",
base_url="https://api.reghelp.net",
timeout=30.0,
max_retries=3,
retry_delay=1.0
)
# Использование как context manager (рекомендуется)
async with RegHelpClient("your_api_key") as client:
# Ваш код здесь
pass
from reghelp_client import AppDevice
# Для Telegram iOS
task = await client.get_push_token(
app_name="tgiOS",
app_device=AppDevice.IOS,
app_version="10.9.2",
app_build="25345",
ref="my_ref_tag"
)
# Для Telegram Android
task = await client.get_push_token(
app_name="tg",
app_device=AppDevice.ANDROID
)
# Проверить статус
status = await client.get_push_status(task.id)
if status.status == "done":
print(f"Токен: {status.token}")
Platform | app_name | Bundle ID |
---|---|---|
Android | tg | org.telegram.messenger |
Android | tg_beta | org.telegram.messenger.beta |
Android | tg_web | org.telegram.messenger.web |
Android | tg_x | org.thunderdog.challegram |
iOS | tgiOS | ph.telegra.Telegraph |
from reghelp_client import PushStatusType
# Если токен оказался неработающим
await client.set_push_status(
task_id="task_id",
phone_number="+15551234567",
status=PushStatusType.NOSMS
)
from reghelp_client import EmailType
# Получить временный email
email_task = await client.get_email(
app_name="tg",
app_device=AppDevice.IOS,
phone="+15551234567",
email_type=EmailType.ICLOUD
)
print(f"Email: {email_task.email}")
# Ждать код подтверждения
email_status = await client.wait_for_result(email_task.id, "email")
print(f"Код: {email_status.code}")
import base64
# Генерируем nonce
nonce = base64.urlsafe_b64encode(b"your_nonce_data").decode()
# Получить integrity токен
integrity_task = await client.get_integrity_token(
app_name="tg",
app_device=AppDevice.ANDROID,
nonce=nonce
)
# Ждать результат
result = await client.wait_for_result(integrity_task.id, "integrity")
print(f"Integrity токен: {result.token}")
from reghelp_client import ProxyConfig, ProxyType
# Настройка прокси (поддерживает длинные значения)
proxy = ProxyConfig(
type=ProxyType.HTTP,
address="very-long-proxy-domain-name.example.com", # до 255 символов
port=8080,
login="very_long_username_up_to_128_chars", # до 128 символов
password="very_long_password_up_to_256_characters" # до 256 символов
)
# Решить recaptcha
recaptcha_task = await client.get_recaptcha_mobile_token(
app_name="org.telegram.messenger",
app_device=AppDevice.ANDROID,
app_key="6Lc-recaptcha-site-key",
app_action="login",
proxy=proxy
)
# Ждать результат
result = await client.wait_for_result(recaptcha_task.id, "recaptcha")
print(f"Recaptcha токен: {result.token}")
# Решить Cloudflare Turnstile
turnstile_task = await client.get_turnstile_token(
url="https://example.com/page",
site_key="0x4AAAA...",
action="login",
proxy="http://proxy.example.com:8080" # опционально
)
# Ждать результат
result = await client.wait_for_result(turnstile_task.id, "turnstile")
print(f"Turnstile токен: {result.token}")
# Получить VoIP push токен
voip_task = await client.get_voip_token(
app_name="tgiOS",
ref="voip_ref"
)
# Ждать результат
result = await client.wait_for_result(voip_task.id, "voip")
print(f"VoIP токен: {result.token}")
# Автоматически ждать выполнения задачи
result = await client.wait_for_result(
task_id="task_id",
service="push", # push, email, integrity, recaptcha, turnstile, voip
timeout=180.0, # максимальное время ожидания
poll_interval=2.0 # интервал между проверками
)
# Создать задачу с webhook
task = await client.get_push_token(
app_name="tgiOS",
app_device=AppDevice.IOS,
webhook="https://yourapp.com/webhook"
)
# Когда задача завершится, на указанный URL придет POST запрос
# с JSON данными аналогичными ответу get_status
from reghelp_client import (
RegHelpError,
RateLimitError,
UnauthorizedError,
TaskNotFoundError,
NetworkError
)
try:
task = await client.get_push_token("tgiOS", AppDevice.IOS)
except RateLimitError:
print("Превышен лимит запросов (50/сек)")
except UnauthorizedError:
print("Неверный API ключ")
except TaskNotFoundError as e:
print(f"Задача не найдена: {e.task_id}")
except NetworkError as e:
print(f"Сетевая ошибка: {e}")
except RegHelpError as e:
print(f"API ошибка: {e}")
import logging
# Включить debug логи
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger("reghelp_client")
import httpx
# Использовать свой HTTP клиент
custom_client = httpx.AsyncClient(
timeout=60.0,
verify=False # отключить SSL проверку (не рекомендуется)
)
client = RegHelpClient(
api_key="your_api_key",
http_client=custom_client
)
import asyncio
async def get_multiple_tokens():
async with RegHelpClient("your_api_key") as client:
# Создать несколько задач параллельно
tasks = await asyncio.gather(*[
client.get_push_token("tgiOS", AppDevice.IOS)
for _ in range(5)
])
# Ждать все результаты
results = await asyncio.gather(*[
client.wait_for_result(task.id, "push")
for task in tasks
])
for i, result in enumerate(results):
print(f"Токен {i+1}: {result.token}")
async def manage_balance():
async with RegHelpClient("your_api_key") as client:
balance = await client.get_balance()
if balance.balance < 10:
print("Низкий баланс! Пополните аккаунт")
return
print(f"Текущий баланс: {balance.balance} {balance.currency}")
async def long_running_task():
async with RegHelpClient("your_api_key") as client:
task = await client.get_push_token("tgiOS", AppDevice.IOS)
# Проверять статус с кастомным интервалом
while True:
status = await client.get_push_status(task.id)
if status.status == "done":
print(f"Готово! Токен: {status.token}")
break
elif status.status == "error":
print(f"Ошибка: {status.message}")
break
print(f"Статус: {status.status}")
await asyncio.sleep(5) # проверять каждые 5 секунд
MIT License. См. LICENSE для деталей.
Variable | Description | Example |
---|---|---|
REGHELP_API_KEY | Your personal API key | demo_123abc |
REGHELP_BASE_URL | Override base URL if you host a private mirror | https://api.reghelp.net |
REGHELP_TIMEOUT | Default request timeout in seconds | 30 |
REGHELP_MAX_RETRIES | Max automatic retries on network errors | 3 |
💡 Tip: you can create a
.env
file and load it with python-dotenv.
# clone repo and install dev extras
git clone https://github.com/REGHELPNET/reghelp_client.git
cd reghelp_client
pip install -e ".[dev]"
# unit tests + coverage
pytest -v --cov=reghelp_client --cov-report=term-missing
Additional commands:
black reghelp_client/ tests/
ruff check reghelp_client/ tests/ examples/
mypy reghelp_client/
git checkout -b feat/my-feature
pip install -e ".[dev]"
pre-commit install
to enable hooks.pytest && ruff check . && mypy .
We follow Conventional Commits for commit messages and the Black code style.
client = RegHelpClient("api_key", timeout=60.0)
No, the library is asynchronous-first. You can run it in synchronous code with asyncio.run()
.
Integrity
refers to Google Play Integrity API while SafetyNet is deprecated. REGHelp supports the new Integrity API.
See CHANGELOG.md for a complete release history.
FAQs
Современная асинхронная Python библиотека для работы с REGHelp Key API
We found that reghelp-client 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.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.