diff --git a/sms.py b/sms.py index 57436c7..f8e4d0c 100644 --- a/sms.py +++ b/sms.py @@ -77,8 +77,9 @@ class SMSPoolProvider(NumberProvider): return self._get("service/retrieve_all", {}) def provision_number(self, service, country, expiry_min): - return self._get("purchase/sms", {"service": service, "country": country, - "expiry": int(expiry_min)}) + # `expiry` is passed for API compatibility but SMSPool ignores it โ + # every rental hard-caps at 20 min (see MAX_RENTAL_MIN). + return self._get("purchase/sms", {"service": service, "country": country}) def check_sms(self, order_id): return self._get("sms/check", {"orderid": order_id}) @@ -132,7 +133,9 @@ DEFAULT_PRICING = [ {"duration_min": 20, "price_sats": 3000}, ] -MAX_RENTAL_MIN = 20 # SMSPool rental window ceiling; longer durations re-rent +MAX_RENTAL_MIN = 20 # VERIFIED 2026-09-20: SMSPool ignores `expiry` param โ rental numbers + # hard-cap at 1200s (20 min) regardless of what's requested. Longer + # sessions require a re-rent loop (not yet implemented). # -------------------------------------------------------------------------- # Schema diff --git a/templates/sms.html b/templates/sms.html index 7370ff9..9f4e5db 100644 --- a/templates/sms.html +++ b/templates/sms.html @@ -6,6 +6,7 @@
Rent a real number for a few minutes to receive a verification code. No outbound. Pay with your wallet balance.
Availability depends on the service you're verifying with. Some services reject temporary, VoIP, or recycled numbers.
+Rentals are capped at 20 minutes (provider limit).
{% if session %} diff --git a/templates/sms_admin.html b/templates/sms_admin.html index 22bb1c7..dfabaaf 100644 --- a/templates/sms_admin.html +++ b/templates/sms_admin.html @@ -3,7 +3,7 @@ {% block body %}SMSPool balance: {{ smspool_balance if smspool_balance is not none else 'unavailable' }} USD
+SMSPool balance: {{ smspool_balance if smspool_balance is not none else 'unavailable' }} USD ยท Rental ceiling: 20 min (SMSPool hard cap โ longer sessions need a re-rent loop)