በዚህ ገጽ ያሉ መዳረሻዎች
GET /v1/api-keys: የAPI ቁልፎችን ይዘርዝሩPOST /v1/api-keys: የAPI ቁልፍ ይፍጠሩDELETE /v1/api-keys/{keyId}: የAPI ቁልፍ ይሰርዙGET /v1/ip-whitelist: የተፈቀዱ IP ዝርዝርን ያሳዩPOST /v1/ip-whitelist: IP ወይም የአድራሻ ክልል በተፈቀዱት ዝርዝር ይጨምሩDELETE /v1/ip-whitelist/{entryId}: ግቤትን ከተፈቀዱት ዝርዝር ያስወግዱ
መሠረታዊ URL https://africaproxies.com/api/v1። የመለያ ማረጋገጫ፣ ስህተቶችና ገደቦች፦ የAPI አጠቃላይ መግለጫ ይመልከቱ።
የAPI ቁልፎችን ይዘርዝሩ
GET/v1/api-keys
ማረጋገጫ፦ የAPI ቁልፍ በAuthorization: Bearer API_KEY ራስጌ ውስጥ።
ምላሽ 200 OK
{
"data": [
{
"id": "key_5n2v8q",
"name": "Rotation script",
"prefix": "pk_4f9a2c",
"scopes": [
"read",
"proxies"
],
"createdAt": "2026-10-05T14:03:11Z",
"lastUsedAt": null
}
],
"limit": 20
}የኮድ ምሳሌዎች
curl -s "https://africaproxies.com/api/v1/api-keys" \
-H "Authorization: Bearer $API_KEY"import os
import requests
API = "https://africaproxies.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
r = requests.get(f"{API}/api-keys", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';
const res = await fetch(`${API}/api-keys`, {
headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());የAPI ቁልፍ ይፍጠሩ
POST/v1/api-keys
ሙሉ secret አንድ ጊዜ ይመለሳል።
ማረጋገጫ፦ የAPI ቁልፍ በAuthorization: Bearer API_KEY ራስጌ ውስጥ።
የጥያቄ አካል
| መስክ | ዓይነት | አስፈላጊ | መግለጫ |
|---|---|---|---|
name | string | አዎ | እስከ 60 ቁምፊዎች |
scopes | array of read · proxies · billing | አዎ | — |
{
"name": "Rotation script",
"scopes": [
"read",
"proxies"
]
}ምላሽ 201 Created
{
"id": "key_5n2v8q",
"name": "Rotation script",
"prefix": "pk_4f9a2c",
"scopes": [
"read",
"proxies"
],
"createdAt": "2026-10-05T14:03:11Z",
"lastUsedAt": null,
"secret": "pk_4f9a2c8e1b7d3f6a9c2e5b8d1f4a7c0e"
}የኮድ ምሳሌዎች
curl -s -X POST "https://africaproxies.com/api/v1/api-keys" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Rotation script","scopes":["read","proxies"]}'import os
import requests
API = "https://africaproxies.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
r = requests.post(f"{API}/api-keys", headers=HEADERS, json={"name": "Rotation script", "scopes": ["read", "proxies"]}, timeout=30)
r.raise_for_status()
print(r.json())// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';
const res = await fetch(`${API}/api-keys`, {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ name: 'Rotation script', scopes: ['read', 'proxies'] }),
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());የAPI ቁልፍ ይሰርዙ
DELETE/v1/api-keys/{keyId}
ማረጋገጫ፦ የAPI ቁልፍ በAuthorization: Bearer API_KEY ራስጌ ውስጥ።
ፓራሜትሮች
| ስም | በ | ዓይነት | አስፈላጊ | መግለጫ |
|---|---|---|---|---|
keyId | path | string | አዎ | — |
ምላሽ 204 No Content
ምንም አካል የለም፡ የሁኔታው ኮድ መልሱ ነው።
የኮድ ምሳሌዎች
curl -s -X DELETE "https://africaproxies.com/api/v1/api-keys/key_5n2v8q" \
-H "Authorization: Bearer $API_KEY"import os
import requests
API = "https://africaproxies.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
r = requests.delete(f"{API}/api-keys/key_5n2v8q", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.status_code) # 204: done// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';
const res = await fetch(`${API}/api-keys/key_5n2v8q`, {
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(res.status); // 204: doneየተፈቀዱ IP ዝርዝርን ያሳዩ
GET/v1/ip-whitelist
ማረጋገጫ፦ የAPI ቁልፍ በAuthorization: Bearer API_KEY ራስጌ ውስጥ።
ምላሽ 200 OK
{
"data": [
{
"id": "ipw_8c1k2m",
"cidr": "203.0.113.24",
"label": "Office server",
"createdAt": "2026-10-05T14:03:11Z"
}
],
"limit": 10
}የኮድ ምሳሌዎች
curl -s "https://africaproxies.com/api/v1/ip-whitelist" \
-H "Authorization: Bearer $API_KEY"import os
import requests
API = "https://africaproxies.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
r = requests.get(f"{API}/ip-whitelist", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';
const res = await fetch(`${API}/ip-whitelist`, {
headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());IP ወይም የአድራሻ ክልል በተፈቀዱት ዝርዝር ይጨምሩ
POST/v1/ip-whitelist
IPv4 አድራሻ፣ ከ /24 እስከ /32 ያለ IPv4 CIDR፣ IPv6 አድራሻ ወይም ከ /48 እስከ /128 ያለ IPv6 CIDR ይቀበላል። የግል፣ ወደ ራስ የሚመለሱና የተያዙ ክልሎች አይቀበሉም (422)። በመግቢያ መስመሩ በ60 ሰከንድ ውስጥ ይሠራል።
ማረጋገጫ፦ የAPI ቁልፍ በAuthorization: Bearer API_KEY ራስጌ ውስጥ።
የጥያቄ አካል
| መስክ | ዓይነት | አስፈላጊ | መግለጫ |
|---|---|---|---|
cidr | string | አዎ | — |
label | string | አይደለም | እስከ 60 ቁምፊዎች |
{
"cidr": "203.0.113.24",
"label": "Office server"
}ምላሽ 201 Created
{
"id": "ipw_8c1k2m",
"cidr": "203.0.113.24",
"label": "Office server",
"createdAt": "2026-10-05T14:03:11Z"
}የኮድ ምሳሌዎች
curl -s -X POST "https://africaproxies.com/api/v1/ip-whitelist" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"cidr":"203.0.113.24","label":"Office server"}'import os
import requests
API = "https://africaproxies.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
r = requests.post(f"{API}/ip-whitelist", headers=HEADERS, json={"cidr": "203.0.113.24", "label": "Office server"}, timeout=30)
r.raise_for_status()
print(r.json())// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';
const res = await fetch(`${API}/ip-whitelist`, {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ cidr: '203.0.113.24', label: 'Office server' }),
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());ግቤትን ከተፈቀዱት ዝርዝር ያስወግዱ
DELETE/v1/ip-whitelist/{entryId}
ማረጋገጫ፦ የAPI ቁልፍ በAuthorization: Bearer API_KEY ራስጌ ውስጥ።
ፓራሜትሮች
| ስም | በ | ዓይነት | አስፈላጊ | መግለጫ |
|---|---|---|---|---|
entryId | path | string | አዎ | — |
ምላሽ 204 No Content
ምንም አካል የለም፡ የሁኔታው ኮድ መልሱ ነው።
የኮድ ምሳሌዎች
curl -s -X DELETE "https://africaproxies.com/api/v1/ip-whitelist/ipw_8c1k2m" \
-H "Authorization: Bearer $API_KEY"import os
import requests
API = "https://africaproxies.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
r = requests.delete(f"{API}/ip-whitelist/ipw_8c1k2m", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.status_code) # 204: done// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';
const res = await fetch(`${API}/ip-whitelist/ipw_8c1k2m`, {
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(res.status); // 204: done