Getting Started
1. Register
Create your account at detect.expert.
After registration, if you have access, the main menu will be available to you with all services.
2. Generate an API Key
In your dashboard, navigate to the API section and generate your X-Api-Key. This key is required for all API requests.
3. Make Your First Request
All API requests are sent to the base URL:
https://detect.expert/api/v1/
Authentication is done via the X-Api-Key header:
import requests
API_KEY = "YOUR_API_KEY"
url = "https://detect.expert/api/v1/users/balance"
headers = {"X-Api-Key": API_KEY}
response = requests.get(url, headers=headers)
print(response.json())
4. Python Client Example
Here is a full client example covering the Numbers (SMS) API:
import time
import requests
class DetectExpertClient:
def __init__(self, api_key, base_url):
self.api_key = api_key
self.base_url = base_url
self.headers = {"X-Api-Key": api_key}
def get_balance(self):
url = f"{self.base_url}/users/balance"
response = requests.get(url=url, headers=self.headers)
return response.text
def buy_number(self, data):
url = f"{self.base_url}/numbers/"
response = requests.post(url=url, json=data, headers=self.headers)
if response.status_code == 201:
return response.json()
return {"error": True}
def get_number_info(self, uuid):
url = f"{self.base_url}/numbers/{uuid}/"
response = requests.get(url=url, headers=self.headers)
if response.status_code == 200:
return response.json()
return {"error": True}
def get_numbers(self):
url = f"{self.base_url}/numbers/"
response = requests.get(url=url, headers=self.headers)
if response.status_code == 200:
return response.json()
return {"error": response.text}
def cancel_number(self, uuid):
url = f"{self.base_url}/numbers/{uuid}/"
response = requests.put(url=url, headers=self.headers)
if response.status_code == 204:
return {"success": True}
return {"error": True}
def get_countries(self):
url = f"{self.base_url}/numbers/mixed/countries/"
response = requests.get(url=url, headers=self.headers)
if response.status_code == 200:
return response.json()
return {"error": True}
def run():
DATA = {
"product": "residential",
"service_code": "yahoo",
"country_code": 187,
"period_code": 1
}
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://detect.expert/api/v1"
client = DetectExpertClient(api_key=API_KEY, base_url=BASE_URL)
balance = client.get_balance()
print(f"Balance: {balance}")
number = client.buy_number(data=DATA)
if number.get("error"):
print("Failed to buy number")
return
print(f"Number ID: {number.get('id')}")
print("Waiting for SMS...")
count = 0
timeout = 5
while True:
print(f"Checking in {timeout}s...")
time.sleep(timeout)
number_info = client.get_number_info(uuid=number.get("id"))
last_sms_code = number_info.get("last_sms_code")
if last_sms_code:
print(f"SMS code: {last_sms_code}")
break
timeout += 5
count += 1
if count >= 10:
print("Timed out waiting for SMS")
break
if __name__ == "__main__":
run()
Next Steps
- Check your balance —
GET /users/balance/ - Browse available countries —
GET /numbers/mixed/countries/ - Buy a phone number —
POST /numbers/ - Order a proxy —
GET /proxies/shop/