öffentliche Dokumentation

API Referenz

Proxy-Käufe und -Verlängerungen automatisieren.

Schlüssel verwalten
Referenz
de

Einführung

Programmierschnittstelle zum Auflisten von Tarifen, Anzeigen von Abonnements, Kaufen neuer Proxys, Verlängern aktiver Abonnements und Konfigurieren der automatischen IP-Rotation.

Die API verwendet einen einzigen Endpoint: /api/proxy. Bei GET-Operationen wird op in der Query-String übergeben, bei POST-Operationen im JSON-Body.

Schnellstart

Erstellen Sie einen API-Schlüssel in Dashboard -> API Keys und senden Sie ihn im Header jeder Anfrage.

BASE="https://makeadsafe.com"
API_KEY="rk_your_long_lived_api_key"

Alle IDs sind alphanumerische Werte in Kleinbuchstaben.

Die Testausstellung via POST /api/proxy mit {"op":"trial","planId":"..."} ist nur für ausgewählte API-Keys verfügbar. Kontaktiere den Support, um diese Funktion für deinen Schlüssel zu aktivieren. Die Testnutzung wird überwacht und kann bei Missbrauch eingeschränkt oder deaktiviert werden.

Verfügbare Tarife

Gibt aktive Proxy-Tarife zurück, die für den Inhaber des API-Schlüssels verfügbar sind.

curl -sS 
  -H "x-api-key: $API_KEY" 
  "$BASE/api/proxy?op=plans"
{
  "ok": true,
  "plans": [
    {
      "id": "k17m3q5v7n9p1r2t4w6y8z0a",
      "connectionType": "private",
      "durationMs": 2592000000,
      "priceAmountCents": 1200,
      "popular": true,
      "remainingProxies": 20,
      "network": {
        "name": "NL-AMS",
        "city": "Amsterdam",
        "country": "NL",
        "networkType": "mobile"
      }
    }
  ]
}

Aktive Abonnements

Gibt Ihre Abonnements zurück, inklusive Zugangsdaten, Protokoll-URLs und IP-Rotationsdaten.

curl -sS 
  -H "x-api-key: $API_KEY" 
  "$BASE/api/proxy?op=subscriptions"
{
  "ok": true,
  "subscriptions": [
    {
      "subscriptionId": "j97b2f6m1k4n8p3r5t7v9x0z",
      "status": "active",
      "activeUntil": 1762592000000,
      "userNote": "Client A",
      "rotationPolicy": 10,
      "label": "12001 - NL - Private",
      "networkLabel": "NL-AMS Amsterdam",
      "credentials": {
        "username": "u_6k8s9d",
        "password": "p_2n4m6q"
      },
      "protocols": {
        "http": "http://u_6k8s9d:[email protected]:12001",
        "socks5": "socks5://u_6k8s9d:[email protected]:12001",
        "vless": "vless://...",
        "shadowsocks": "ss://..."
      },
      "rotate": {
        "rotatePath": "/r/abcd1234",
        "available": true
      }
    }
  ]
}

Verlängerungstarife

Gibt Tarife zurück, die für die Verlängerung eines bestimmten Abonnements geeignet sind.

SUB_ID="j97b2f6m1k4n8p3r5t7v9x0z"

curl -sS 
  -H "x-api-key: $API_KEY" 
  "$BASE/api/proxy?op=renewal-plans&subscriptionId=$SUB_ID"
{
  "ok": true,
  "renewalPlans": [
    {
      "id": "k17m3q5v7n9p1r2t4w6y8z0a",
      "connectionType": "private",
      "durationMs": 2592000000,
      "priceAmountCents": 1200
    }
  ]
}

Verfügbare Netzwerke

Gibt Netzwerke zurück, die zum Wechseln eines bestimmten Abonnements verfügbar sind.

SUB_ID="j97b2f6m1k4n8p3r5t7v9x0z"

curl -sS 
  -H "x-api-key: $API_KEY" 
  "$BASE/api/proxy?op=available-networks&subscriptionId=$SUB_ID"
{
  "ok": true,
  "networks": [
    {
      "id": "b1c2d3e4f5g6h7j8k9m0n1p2",
      "networkLabel": "DE-BER Berlin",
      "country": "DE"
    }
  ]
}

Verwenden Sie networks[].id als targetNetwork in der Anfrage switch-network.

Abonnement kaufen

Erstellt ein oder mehrere neue Abonnements aus Ihrem Guthaben mit dem ausgewählten Tarif.

Optionale Felder:

  • couponCode: wendet einen gültigen Gutschein auf den Kauf an.
  • repeatCount: positive Ganzzahl, Standardwert 1; multipliziert Laufzeit und Preis jedes erstellten Abonnements.
  • quantity: positive Ganzzahl, Standardwert 1; erstellt mehrere Abonnements in einer Anfrage.
  • os: passiver OS-Fingerabdruck für alle erstellten Proxys; ios, macos, android, win10 oder win11. Für multi-Tarife nicht verfügbar.
{
  "op": "purchase",
  "planId": "k17m3q5v7n9p1r2t4w6y8z0a",
  "couponCode": "MYCODE",
  "repeatCount": 3,
  "os": "ios",
  "quantity": 2
}
curl -sS -X POST 
  -H "x-api-key: $API_KEY" 
  -H "Content-Type: application/json" 
  -d '{"op":"purchase","planId":"k17m3q5v7n9p1r2t4w6y8z0a","repeatCount":3,"os":"ios","quantity":2}' 
  "$BASE/api/proxy"
{
  "ok": true,
  "subscriptionId": "j97b2f6m1k4n8p3r5t7v9x0z",
  "subscriptionIds": [
    "j97b2f6m1k4n8p3r5t7v9x0z",
    "n38k2f6m1k4n8p3r5t7v9x0z"
  ],
  "subscriptions": [
    {
      "subscriptionId": "j97b2f6m1k4n8p3r5t7v9x0z",
      "status": "active",
      "activeUntil": 1767776000000,
      "label": "12001 - NL - Private",
      "networkLabel": "NL-AMS Amsterdam"
    },
    {
      "subscriptionId": "n38k2f6m1k4n8p3r5t7v9x0z",
      "status": "active",
      "activeUntil": 1767776000000,
      "label": "12002 - NL - Private",
      "networkLabel": "NL-AMS Amsterdam"
    }
  ]
}

Wenn genau ein Abonnement erstellt wird, kann das Gateway subscription statt subscriptions zurückgeben. Elemente in subscription/subscriptions haben dieselbe Struktur wie bei GET /api/proxy?op=subscriptions.

Abonnement verlängern

Verlängert ein bestehendes Abonnement mit einem geeigneten Verlängerungstarif.

Optionale Felder:

  • couponCode: wendet einen gültigen Gutschein auf die Verlängerung an.
  • repeatCount: positive Ganzzahl, Standardwert 1; multipliziert Laufzeit und Preis der Verlängerung.
{
  "op": "renew",
  "subscriptionId": "j97b2f6m1k4n8p3r5t7v9x0z",
  "planId": "q2w4e6r8t0y2u4i6o8p0a2s4",
  "couponCode": "MYCODE",
  "repeatCount": 3
}
curl -sS -X POST 
  -H "x-api-key: $API_KEY" 
  -H "Content-Type: application/json" 
  -d '{"op":"renew","subscriptionId":"j97b2f6m1k4n8p3r5t7v9x0z","planId":"q2w4e6r8t0y2u4i6o8p0a2s4","repeatCount":3}' 
  "$BASE/api/proxy"
{
  "ok": true,
  "subscriptionId": "j97b2f6m1k4n8p3r5t7v9x0z",
  "endAt": 1770368000000
}

Verbindungsdaten ändern

Regeneriert die Verbindungsdaten für ein aktives Abonnement des authentifizierten Nutzers (JWT) oder des API-Key-Inhabers.

{
  "op": "change-credentials",
  "subscriptionId": "j97b2f6m1k4n8p3r5t7v9x0z"
}
curl -sS -X POST 
  -H "x-api-key: $API_KEY" 
  -H "Content-Type: application/json" 
  -d '{"op":"change-credentials","subscriptionId":"j97b2f6m1k4n8p3r5t7v9x0z"}' 
  "$BASE/api/proxy"
{
  "ok": true,
  "password": "q7N3x9Lp",
  "vpn": "7f3d9d4a-8b9f-4a93-9f55-2d5e3b7f1c24"
}

Auto-Rotationsrichtlinie festlegen

Konfiguriert die automatische IP-Rotation für ein aktives Abonnement. Verfügbar nur für Verbindungen mit "rotate": { "available": true }.

Zulässige Werte für rotationPolicy: 0, 5, 10, 15, 30, 60 Minuten. Verwende 0, um die Auto-Rotation zu deaktivieren.

{
  "op": "set-rotation-policy",
  "subscriptionId": "j97b2f6m1k4n8p3r5t7v9x0z",
  "rotationPolicy": 10
}
curl -sS -X POST 
  -H "x-api-key: $API_KEY" 
  -H "Content-Type: application/json" 
  -d '{"op":"set-rotation-policy","subscriptionId":"j97b2f6m1k4n8p3r5t7v9x0z","rotationPolicy":10}' 
  "$BASE/api/proxy"
{
  "ok": true
}

Verbindungsnetzwerk ändern

Verschiebt ein aktives Abonnement in ein anderes verfügbares Netzwerk.

{
  "op": "switch-network",
  "subscriptionId": "j97b2f6m1k4n8p3r5t7v9x0z",
  "targetNetwork": "b1c2d3e4f5g6h7j8k9m0n1p2"
}
curl -sS -X POST 
  -H "x-api-key: $API_KEY" 
  -H "Content-Type: application/json" 
  -d '{"op":"switch-network","subscriptionId":"j97b2f6m1k4n8p3r5t7v9x0z","targetNetwork":"b1c2d3e4f5g6h7j8k9m0n1p2"}' 
  "$BASE/api/proxy"
{
  "ok": true,
  "subscription": {
    "subscriptionId": "j97b2f6m1k4n8p3r5t7v9x0z",
    "status": "active",
    "activeUntil": 1762592000000,
    "userNote": "Client A",
    "rotationPolicy": 10,
    "label": "12001 - DE - Private",
    "networkLabel": "DE-BER Berlin",
    "credentials": {
      "username": "u_6k8s9d",
      "password": "p_2n4m6q"
    },
    "protocols": {
      "http": "http://u_6k8s9d:[email protected]:12001",
      "socks5": "socks5://u_6k8s9d:[email protected]:12001",
      "vless": "vless://...",
      "shadowsocks": "ss://..."
    },
    "rotate": {
      "rotatePath": "/r/abcd1234",
      "available": true
    }
  }
}

Gateway-Fehler

  • 400 Ungültiges JSON im Body
  • 400 Body muss ein Objekt sein
  • 400 Fehlendes oder unbekanntes op
  • 400 Fehlender oder ungültiger planId/subscriptionId/targetNetwork/rotationPolicy
  • 400 Ungültiger repeatCount oder quantity
  • 400 Ungültiges os
  • 401 Unauthorized
  • 402 Unzureichendes Guthaben
  • 403 Forbidden
  • 404 Abonnement nicht gefunden
  • 409 Rotationsrichtlinie für dieses Abonnement nicht verfügbar
  • 409 Ausverkauft, inaktiver Tarif/Netzwerk oder ungültiger Abonnementstatus
  • 409 Die OS-Auswahl ist für multi-Tarife nicht verfügbar
  • 429 Rate limited
  • 500 Internal error