egotg
Official Python SDK for ego.tg — SMS aggregation platform. One API, every SMS provider.
Install
pip install egotg
Quick Start
import egotg
client = egotg.Client("your_api_key")
# Get cheapest WhatsApp number
number = client.get_number(service="wa", country="auto")
print(f"Use this number: +{number.phone}")
# Wait for verification code
code = number.wait_for_code(timeout=120)
print(f"Got code: {code}")
# Done
number.complete()
API
Client
client = egotg.Client("your_api_key")
client = egotg.Client("your_api_key", base_url="https://ego.tg/api")
Account
balance = client.balance() # Returns float (USD)
Services & Pricing
services = client.services() # [{"code": "tg", "name": "Telegram"}, ...]
countries = client.countries() # {"22": {"id": "22", "eng": "India"}, ...}
prices = client.prices("tg") # Sorted by price ascending
prices = client.prices("wa", country="22") # Filter by country
Buy Numbers
# Auto-select cheapest country
number = client.get_number(service="tg", country="auto")
# Specific country
number = client.get_number(service="wa", country="22")
print(number.phone) # "628123456789"
print(number.service) # "wa"
print(number.status) # "waiting"
Wait for Code
code = number.wait_for_code(timeout=120, interval=5)
# Polls every 5s for up to 120s, returns the code string
# Raises TimeoutError if no code received
Complete / Cancel
number.complete() # Mark as used
refund = number.cancel() # Cancel and get refund
Error Handling
from egotg import InsufficientBalance, NoNumbers, EgoError
try:
number = client.get_number(service="tg")
except InsufficientBalance:
print("Top up at https://ego.tg/payments")
except NoNumbers:
print("Try a different service or country")
except EgoError as e:
print(f"API error: {e}")
Supported Services
190+ countries, 500+ services including:
| Code | Service |
|---|---|
tg |
Telegram |
wa |
|
ig |
|
go |
|
tw |
Twitter/X |
fb |
|
mt |
Steam |
nf |
Netflix |
am |
Amazon |
Links
Metadata
Release files for egotg 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| egotg-0.1.0.tar.gz | 4.3 kB | Without provenance | Details for egotg-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| egotg-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for egotg-0.1.0-py3-none-any.whl |
Total release size: 8.9 kB
Release files / egotg-0.1.0.tar.gz
| Download URL | egotg-0.1.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ea6197b1259cacc9c042d19ed2156761d403dfb8f4810fdf28c11999108c88c
|
|
BLAKE2b-256 checksum How to use checksums |
08b84dfb892e5bf3fdfb4f41ed8967d74fa0ea2414ddba591df42215f35ff96b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / egotg-0.1.0-py3-none-any.whl
| Download URL | egotg-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3accba903d571ba1aa2202d4a9e2673182ea4ce8713b3cac1fe859f797afc0fa
|
|
BLAKE2b-256 checksum How to use checksums |
2a5a849db63580d84cd250000a2b3459b64ec33a868e947579608e850ce3b231
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for egotg 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.