smskap 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
smskap/__init__.py ADDED
@@ -0,0 +1,15 @@
1
+ """
2
+ SMSKap Official Python SDK
3
+ ==========================
4
+ Next-generation physical SIM non-VoIP SMS verification and virtual numbers.
5
+ Supported Services: WhatsApp, WhatsApp Business, Telegram
6
+ Supported Geographies: Turkey (+90), United States (+1), United Kingdom (+44)
7
+
8
+ Website: https://www.smskap.com/
9
+ """
10
+
11
+ from .client import SMSKapClient, SMSKapError
12
+
13
+ __version__ = "1.0.0"
14
+ __author__ = "SMSKap Engineering"
15
+ __all__ = ["SMSKapClient", "SMSKapError", "__version__"]
smskap/client.py ADDED
@@ -0,0 +1,92 @@
1
+ import requests
2
+ from typing import Dict, Any, Optional
3
+
4
+ class SMSKapError(Exception):
5
+ """Custom exception raised for SMSKap API errors."""
6
+ pass
7
+
8
+ class SMSKapClient:
9
+ """
10
+ Official client for SMSKap SMS Verification & Virtual Phone Number API.
11
+
12
+ Website: https://www.smskap.com/
13
+ Documentation: https://www.smskap.com/sms-onay
14
+ """
15
+
16
+ BASE_URL = "https://www.smskap.com/api/v1"
17
+ SUPPORTED_SERVICES = ["whatsapp", "whatsapp_business", "telegram"]
18
+ SUPPORTED_COUNTRIES = {
19
+ "tr": {"code": "+90", "name": "Turkey"},
20
+ "usa": {"code": "+1", "name": "United States"},
21
+ "uk": {"code": "+44", "name": "United Kingdom"}
22
+ }
23
+
24
+ def __init__(self, api_key: str, timeout: int = 15):
25
+ if not api_key:
26
+ raise SMSKapError("API key is required to initialize SMSKapClient.")
27
+ self.api_key = api_key
28
+ self.timeout = timeout
29
+ self.session = requests.Session()
30
+ self.session.headers.update({
31
+ "Authorization": f"Bearer {self.api_key}",
32
+ "User-Agent": "SMSKap-Python-SDK/1.0.0 (https://www.smskap.com/)"
33
+ })
34
+
35
+ def get_balance(self) -> Dict[str, Any]:
36
+ """Fetch real-time user balance and account status."""
37
+ try:
38
+ res = self.session.get(f"{self.BASE_URL}/balance", timeout=self.timeout)
39
+ res.raise_for_status()
40
+ return res.json()
41
+ except requests.RequestException as e:
42
+ raise SMSKapError(f"Balance request failed: {e}")
43
+
44
+ def request_number(self, service: str, country: str = "tr") -> Dict[str, Any]:
45
+ """
46
+ Request an instant physical SIM virtual phone number.
47
+
48
+ :param service: 'whatsapp', 'whatsapp_business', or 'telegram'
49
+ :param country: 'tr' (+90), 'usa' (+1), or 'uk' (+44)
50
+ """
51
+ service_clean = service.lower().replace(" ", "_")
52
+ country_clean = country.lower()
53
+
54
+ if service_clean not in self.SUPPORTED_SERVICES:
55
+ raise SMSKapError(
56
+ f"Unsupported service '{service}'. Supported: {', '.join(self.SUPPORTED_SERVICES)}"
57
+ )
58
+
59
+ if country_clean not in self.SUPPORTED_COUNTRIES:
60
+ raise SMSKapError(
61
+ f"Unsupported country '{country}'. Supported: {', '.join(self.SUPPORTED_COUNTRIES.keys())}"
62
+ )
63
+
64
+ payload = {
65
+ "service": service_clean,
66
+ "country": country_clean
67
+ }
68
+
69
+ try:
70
+ res = self.session.post(f"{self.BASE_URL}/rentals", json=payload, timeout=self.timeout)
71
+ res.raise_for_status()
72
+ return res.json()
73
+ except requests.RequestException as e:
74
+ raise SMSKapError(f"Number allocation failed: {e}")
75
+
76
+ def get_sms_code(self, activation_id: str) -> Dict[str, Any]:
77
+ """Poll incoming OTP verification code for a requested number."""
78
+ try:
79
+ res = self.session.get(f"{self.BASE_URL}/rentals/{activation_id}", timeout=self.timeout)
80
+ res.raise_for_status()
81
+ return res.json()
82
+ except requests.RequestException as e:
83
+ raise SMSKapError(f"SMS retrieval failed: {e}")
84
+
85
+ def cancel_number(self, activation_id: str) -> Dict[str, Any]:
86
+ """Cancel number and trigger 100% automated balance refund if OTP not received."""
87
+ try:
88
+ res = self.session.delete(f"{self.BASE_URL}/rentals/{activation_id}", timeout=self.timeout)
89
+ res.raise_for_status()
90
+ return res.json()
91
+ except requests.RequestException as e:
92
+ raise SMSKapError(f"Cancellation failed: {e}")
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.4
2
+ Name: smskap
3
+ Version: 1.0.0
4
+ Summary: SMSKap Official Python SDK - Non-VoIP real carrier SMS verification and virtual phone numbers for WhatsApp, WhatsApp Business, and Telegram.
5
+ Author-email: SMSKap Engineering <support@smskap.com>
6
+ Project-URL: Homepage, https://www.smskap.com/
7
+ Project-URL: Documentation, https://www.smskap.com/sms-onay
8
+ Project-URL: WhatsApp Sanal Numara, https://www.smskap.com/whatsapp-sanal-numara
9
+ Project-URL: Global Virtual Numbers, https://www.smskap.com/en/whatsapp-virtual-number
10
+ Project-URL: Telegram Verification, https://www.smskap.com/telegram-sanal-numara
11
+ Project-URL: Source, https://github.com/smsonay34/smskap-telecom-api
12
+ Keywords: sms-onay,wp-sanal-numara,sanal-numara-alma,whatsapp-virtual-number,telegram-virtual-number,non-voip,usa-virtual-number,uk-virtual-number,smskap
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Telecommunications Industry
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
26
+ Classifier: Topic :: Communications :: Telephony
27
+ Classifier: Topic :: Security
28
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
+ Requires-Python: >=3.8
30
+ Description-Content-Type: text/markdown
31
+ Requires-Dist: requests>=2.25.0
32
+
33
+ # SMSKap Official Python SDK 🚀
34
+
35
+ [![PyPI version](https://img.shields.io/pypi/v/smskap.svg)](https://pypi.org/project/smskap/)
36
+ [![Python Versions](https://img.shields.io/pypi/pyversions/smskap.svg)](https://pypi.org/project/smskap/)
37
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
38
+
39
+ **[SMSKap](https://www.smskap.com/)** is an enterprise-grade telecommunications and physical cellular carrier routing platform delivering single-use disposable SMS verification codes and private virtual phone numbers.
40
+
41
+ Designed specifically for mission-critical workflows across **WhatsApp**, **WhatsApp Business**, and **Telegram**, SMSKap routes OTP traffic through authentic physical SIM cards across **Turkey (+90)**, **United States (+1)**, and the **United Kingdom (+44)**.
42
+
43
+ ---
44
+
45
+ ## 📌 Primary Features & Telecom Standards
46
+
47
+ * **100% Real Carrier Non-VoIP Routing:** Eliminates Meta and Telegram VoIP fraud detection filters to ensure 0% ban rates.
48
+ * **Instant OTP Delivery (10–30s):** Direct HLR-connected cellular base station query protocol.
49
+ * **Automated 100% Refund Guarantee:** If an activation code does not arrive within 60–90 seconds, the allocated balance is automatically refunded.
50
+ * **Single-Use Confidentiality:** Numbers are allocated strictly on a single-use basis and permanently retired to protect account privacy.
51
+
52
+ ---
53
+
54
+ ## 🔗 Official Portals & Core Services
55
+
56
+ * **Ana Platform:** [SMS Onay ve Sanal Numara Al](https://www.smskap.com/)
57
+ * **WhatsApp Hat Tahsisi (TR):** [wp sanal numara](https://www.smskap.com/whatsapp-sanal-numara)
58
+ * **SMS Doğrulama Servisi (TR):** [sms onay](https://www.smskap.com/sms-onay)
59
+ * **Tek Kullanımlık Numara Alma:** [sanal numara alma](https://www.smskap.com/sanal-numara)
60
+ * **Telegram Doğrulama:** [telegram sanal numara](https://www.smskap.com/telegram-sanal-numara)
61
+ * **Global Verification (EN):** [WhatsApp virtual number](https://www.smskap.com/en/whatsapp-virtual-number)
62
+ * **Enterprise Non-VoIP Numbers:** [non-VoIP virtual phone numbers](https://www.smskap.com/en/virtual-phone-number)
63
+ * **North America Routing (+1):** [USA virtual number](https://www.smskap.com/en/usa-virtual-number)
64
+ * **United Kingdom Routing (+44):** [UK virtual number](https://www.smskap.com/en/uk-virtual-number)
65
+
66
+ ---
67
+
68
+ ## 📦 Installation
69
+
70
+ ```bash
71
+ pip install smskap
72
+ ```
73
+
74
+ ---
75
+
76
+ ## 🚀 Quickstart Example
77
+
78
+ ```python
79
+ from smskap import SMSKapClient, SMSKapError
80
+
81
+ # Initialize client with your private API key
82
+ client = SMSKapClient(api_key="YOUR_SMSKAP_API_KEY")
83
+
84
+ try:
85
+ # 1. Check account balance
86
+ balance = client.get_balance()
87
+ print("Available Balance:", balance)
88
+
89
+ # 2. Request an authentic physical SIM number for WhatsApp in Turkey (+90)
90
+ # Supported services: 'whatsapp', 'whatsapp_business', 'telegram'
91
+ # Supported countries: 'tr' (+90), 'usa' (+1), 'uk' (+44)
92
+ rental = client.request_number(service="whatsapp", country="tr")
93
+ print(f"Allocated Phone Number: {rental['phone_number']}")
94
+ print(f"Activation ID: {rental['id']}")
95
+
96
+ # 3. Poll for the incoming SMS verification code
97
+ sms = client.get_sms_code(rental["id"])
98
+ if sms.get("code"):
99
+ print(f"Received SMS Verification Code: {sms['code']}")
100
+ else:
101
+ print("Waiting for SMS dispatch...")
102
+
103
+ except SMSKapError as e:
104
+ print(f"SMSKap Error: {e}")
105
+ ```
106
+
107
+ ---
108
+
109
+ ## 📊 Physical Carrier SIM vs. Virtual VoIP Routing
110
+
111
+ | Metric | SMSKap Physical Carrier SIM | Shared VoIP Services |
112
+ | :--- | :--- | :--- |
113
+ | **Carrier Detection** | Real GSM Mobile Carrier (Turkcell, Vodafone, EE, AT&T) | Virtual PBX / VoIP Datacenter |
114
+ | **WhatsApp Ban Risk** | **0% (Verified Mobile SMR)** | High (Blacklisted by Meta) |
115
+ | **Telegram Ban Risk** | **0% (HLR-verified cellular network)** | Immediate Account Suspension |
116
+ | **Refund Policy** | **100% Automated if no code received** | Manual / No refund |
117
+ | **Delivery Speed** | Instant Cellular Route (10–30s) | Unreliable / High Latency |
118
+
119
+ ---
120
+
121
+ ## 🛡️ License
122
+
123
+ This project is licensed under the MIT License — see the [LICENSE](https://opensource.org/licenses/MIT) file for details.
124
+ Official Website: [https://www.smskap.com/](https://www.smskap.com/)
@@ -0,0 +1,6 @@
1
+ smskap/__init__.py,sha256=byY_vSvdUyHdI1_6c2npzqjqosUlP2PumLDoHr8M1dE,469
2
+ smskap/client.py,sha256=gYoVc9fO9O39-YU733_ydhspWwMp5mq1Dj8a7ogPvmw,3597
3
+ smskap-1.0.0.dist-info/METADATA,sha256=-M7_aq-JWLDVYLZi8_oqYP9Bc2Bo_vJ1UAcHChzKISw,6058
4
+ smskap-1.0.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
5
+ smskap-1.0.0.dist-info/top_level.txt,sha256=AnDl9wZQZY92TJclCzMWJpIRnnMSYeg2hTTri-8fla0,7
6
+ smskap-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ smskap