Separate logins for team members, projects and applications, each with its own traffic limit.
A sub-user is a proxy login of its own on your account's traffic. Give one to each script, server or team member: its usage is counted apart, a limit stops it without touching the others, and its password can be changed without breaking theirs.
limit_gb caps a sub-user at that many GB of your account's traffic; 0 means no limit of its own (it can use everything the account has). When a sub-user reaches its limit the gateway answers 402 for its login. You can have up to 50 sub-users per product. Sub-users are for your own organization: giving access to people outside it counts as resale, which our Terms allow only with our written consent.
import os
import requests
r = requests.get(
"https://aeonproxy.com/api/v1/sub-users?product=residential",
headers={"Authorization": f"Bearer {os.environ['AEONPROXY_API_KEY']}"},
timeout=30,
)
data = r.json()
if not r.ok:
raise SystemExit(data["error"]["message"])
print(data)
// Node.js 18+, as an ES module (.mjs)
const res = await fetch("https://aeonproxy.com/api/v1/sub-users?product=residential", {
headers: {
Authorization: `Bearer ${process.env.AEONPROXY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(data.error.message);
console.log(data);
Creates a login with a random password. The name is stored in lower case, with anything other than letters, digits and dashes turned into dashes. Send an Idempotency-Key header to retry safely.
Body (JSON)
Name
Type
Description
productrequired
residential | mobile
Which pool: residential or mobile.
namerequired
string
Up to 24 characters, unique per product.
limit_gb
number
Traffic limit in GB, in steps of 0.1. 0: no limit of its own. Capped at the traffic you have bought. From 0. Default 0.
import os
import requests
r = requests.get(
"https://aeonproxy.com/api/v1/sub-users/311",
headers={"Authorization": f"Bearer {os.environ['AEONPROXY_API_KEY']}"},
timeout=30,
)
data = r.json()
if not r.ok:
raise SystemExit(data["error"]["message"])
print(data)
// Node.js 18+, as an ES module (.mjs)
const res = await fetch("https://aeonproxy.com/api/v1/sub-users/311", {
headers: {
Authorization: `Bearer ${process.env.AEONPROXY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(data.error.message);
console.log(data);
Renames a sub-user or changes its limit; send only the fields to change. The login and password stay the same. Lowering the limit below what it has used stops it at once.
import os
import requests
r = requests.patch(
"https://aeonproxy.com/api/v1/sub-users/311",
headers={"Authorization": f"Bearer {os.environ['AEONPROXY_API_KEY']}"},
json={"limit_gb": 10},
timeout=30,
)
data = r.json()
if not r.ok:
raise SystemExit(data["error"]["message"])
print(data)
// Node.js 18+, as an ES module (.mjs)
const res = await fetch("https://aeonproxy.com/api/v1/sub-users/311", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.AEONPROXY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ limit_gb: 10 }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error.message);
console.log(data);
import os
import requests
r = requests.delete(
"https://aeonproxy.com/api/v1/sub-users/311",
headers={"Authorization": f"Bearer {os.environ['AEONPROXY_API_KEY']}"},
timeout=30,
)
data = r.json()
if not r.ok:
raise SystemExit(data["error"]["message"])
print(data)
// Node.js 18+, as an ES module (.mjs)
const res = await fetch("https://aeonproxy.com/api/v1/sub-users/311", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.AEONPROXY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(data.error.message);
console.log(data);
curl -X POST "https://aeonproxy.com/api/v1/sub-users/311/password" \
-H "Authorization: Bearer $AEONPROXY_API_KEY"
import os
import requests
r = requests.post(
"https://aeonproxy.com/api/v1/sub-users/311/password",
headers={"Authorization": f"Bearer {os.environ['AEONPROXY_API_KEY']}"},
timeout=30,
)
data = r.json()
if not r.ok:
raise SystemExit(data["error"]["message"])
print(data)
// Node.js 18+, as an ES module (.mjs)
const res = await fetch("https://aeonproxy.com/api/v1/sub-users/311/password", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AEONPROXY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(data.error.message);
console.log(data);