Smsbower - Online Request API
Smsbower - Online Request API
online
Balance
import requests
# API endpoint
url = f'https://smsbower.online/stubs/handler_api.php?
api_key={api_key}&action=getBalance'
try:
# Send a GET request to the API
response = requests.get(url)
except Exception as e:
print(f"An error occurred: {e}")
Request Number
import requests
# Parameters
service = 'go' # e.g., 'go' for Google, Gmail, Youtube
country = '0' # e.g., '0' for Russian Federation
max_price = '10' # Maximum price you're ready to pay
phone_exception = '' # Exclude certain phone numbers, leave empty if not needed
ref = '' # Referral ID, leave empty if not applicable
# API endpoint
url = f'https://smsbower.online/stubs/handler_api.php?
api_key={api_key}&action=getNumber&service={service}&country={country}&maxPrice={ma
x_price}&phoneException={phone_exception}&ref={ref}'
try:
# Send a GET request to the API
response = requests.get(url)
except Exception as e:
print(f"An error occurred: {e}")
Request Code
import requests
import time
try:
# Step 1: Get a phone number
response = requests.get(get_number_url)
if response.status_code == 200:
result = response.text
if result.startswith("ACCESS_NUMBER"):
# Extract activation ID and phone number from the response
parts = result.split(":")
activation_id = parts[1]
phone_number = parts[2]
print(f"Phone Number: {phone_number}")
print(f"Activation ID: {activation_id}")
else:
print(f"Failed to connect to API. Status code: {response.status_code}")
except Exception as e:
print(f"An error occurred: {e}")