# Porti za simu na kubadilisha IP

> API ya AfricaProxies: porti za 4G/5G, kubadili IP sasa, kwa muda au kiungo, na data za siku. Vigezo, majibu, curl, Python na Node.js.

- URL: https://africaproxies.com/sw/docs/api/mobile/
- Iliyoruushwa mwisho: 2026-10-15
- Mchapishi: AfricaProxies (https://africaproxies.com)

Porti maalumu za 4G/5G: badilisha IP sasa au kwa muda uliowekwa, tumia kiungo cha kubadilisha na usome data za siku.

**Vituo vya maombi kwenye ukurasa huu**

- `GET /v1/mobile`: Orodhesha porti za simu
- `GET /v1/mobile/{portId}`: Pata porti ya simu
- `PATCH /v1/mobile/{portId}`: Badili jina, wezesha/zima kuongeza muda kiotomatiki au sanidi kubadilisha anwani kiotomatiki
- `POST /v1/mobile/{portId}/rotate`: Badilisha IP sasa
- `GET /v1/mobile/{portId}/rotate`: Kiungo cha kubadilisha (GET yenye ufunguo wa API kwenye hoja za anwani)
- `POST /v1/mobile/{portId}/reset-password`: Tengeneza nenosiri jipya la proxy kwa porti
- `GET /v1/mobile/{portId}/usage`: Data za kila siku kupitia porti (kwa taarifa: data bila kikomo, kwa matumizi ya haki)
- `GET /v1/catalog/countries/{countryCode}/carriers`: Watoa huduma za simu wenye porti za 4G/5G zinazopatikana katika nchi

URL ya msingi `https://africaproxies.com/api/v1`. Uthibitishaji, hitilafu na vikomo: angalia [muhtasari wa API](/sw/docs/api/).

## Orodhesha porti za simu

`GET /v1/mobile`

Uthibitishaji: funguo ya API kwenye kichwa cha `Authorization: Bearer API_KEY`.

**Jibu** `200 OK`

```json
{
  "data": [
    {
      "id": "mob_2v8k1q",
      "label": "AE Etisalat #1",
      "status": "active",
      "country": "AE",
      "city": null,
      "carrier": "etisalat",
      "carrierName": "Etisalat",
      "networkType": "4G",
      "currentIp": "203.0.113.201",
      "ipChangedAt": "2026-10-05T14:03:11Z",
      "endpoint": {
        "host": "gw.africaproxies.com",
        "httpPort": 7777,
        "socksPort": 7778
      },
      "username": "USERNAME",
      "password": "PASSWORD",
      "rotation": {
        "mode": "interval",
        "intervalMinutes": 10
      },
      "minRotationIntervalSeconds": 30,
      "rotationLink": "https://africaproxies.com/api/v1/mobile/mob_2v8k1q/rotate?key=API_KEY",
      "planId": "mob-30d",
      "autoRenew": false,
      "createdAt": "2026-10-05T14:03:11Z",
      "expiresAt": "2026-11-04T14:03:11Z"
    }
  ]
}
```

*curl*

```bash
curl -s "https://africaproxies.com/api/v1/mobile" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://africaproxies.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/mobile", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';

const res = await fetch(`${API}/mobile`, {
  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());
```

## Pata porti ya simu

`GET /v1/mobile/{portId}`

Uthibitishaji: funguo ya API kwenye kichwa cha `Authorization: Bearer API_KEY`.

**Parameta**

| Jina | Katika | Aina | Inahitajika | Maelezo |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Ndiyo | — |

**Jibu** `200 OK`

```json
{
  "id": "mob_2v8k1q",
  "label": "AE Etisalat #1",
  "status": "active",
  "country": "AE",
  "city": null,
  "carrier": "etisalat",
  "carrierName": "Etisalat",
  "networkType": "4G",
  "currentIp": "203.0.113.201",
  "ipChangedAt": "2026-10-05T14:03:11Z",
  "endpoint": {
    "host": "gw.africaproxies.com",
    "httpPort": 7777,
    "socksPort": 7778
  },
  "username": "USERNAME",
  "password": "PASSWORD",
  "rotation": {
    "mode": "interval",
    "intervalMinutes": 10
  },
  "minRotationIntervalSeconds": 30,
  "rotationLink": "https://africaproxies.com/api/v1/mobile/mob_2v8k1q/rotate?key=API_KEY",
  "planId": "mob-30d",
  "autoRenew": false,
  "createdAt": "2026-10-05T14:03:11Z",
  "expiresAt": "2026-11-04T14:03:11Z"
}
```

*curl*

```bash
curl -s "https://africaproxies.com/api/v1/mobile/mob_2v8k1q" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://africaproxies.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/mobile/mob_2v8k1q", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';

const res = await fetch(`${API}/mobile/mob_2v8k1q`, {
  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());
```

## Badili jina, wezesha/zima kuongeza muda kiotomatiki au sanidi kubadilisha anwani kiotomatiki

`PATCH /v1/mobile/{portId}`

Badili jina la porti, washa/zima kuongeza muda kiotomatiki, au weka muda wa kubadilisha anwani kuanzia kila dakika 2 hadi kila saa 24: `"rotation": { "mode": "interval", "intervalMinutes": 10 }` (dakika 2–1440); `"mode": "manual"` huuzima. Vinginevyo porti inahifadhi IP yake hadi uibadilishe, ingawa mtoa huduma anaweza kuibadilisha mwenyewe wakati mwingine.

Uthibitishaji: funguo ya API kwenye kichwa cha `Authorization: Bearer API_KEY`.

**Parameta**

| Jina | Katika | Aina | Inahitajika | Maelezo |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Ndiyo | — |

**Mwili wa ombi**

| Uwanja | Aina | Inahitajika | Maelezo |
| --- | --- | --- | --- |
| `label` | string | Hapana | herufi zisizozidi 60 |
| `autoRenew` | boolean | Hapana | — |
| `rotation` | object | Hapana | Muda wa kubadilisha kiotomatiki: `{ "mode": "interval", "intervalMinutes": 2–1440 }` (kutoka kila dakika 2 hadi kila saa 24), au `{ "mode": "manual", "intervalMinutes": null }` kubadilisha tu unapoomba. |

*Mfano: Kubadilisha kiotomatiki*

```json
{
  "rotation": {
    "mode": "interval",
    "intervalMinutes": 10
  }
}
```

*Mfano: Kwa mkono*

```json
{
  "rotation": {
    "mode": "manual",
    "intervalMinutes": null
  }
}
```

**Jibu** `200 OK`

```json
{
  "id": "mob_2v8k1q",
  "label": "AE Etisalat #1",
  "status": "active",
  "country": "AE",
  "city": null,
  "carrier": "etisalat",
  "carrierName": "Etisalat",
  "networkType": "4G",
  "currentIp": "203.0.113.201",
  "ipChangedAt": "2026-10-05T14:03:11Z",
  "endpoint": {
    "host": "gw.africaproxies.com",
    "httpPort": 7777,
    "socksPort": 7778
  },
  "username": "USERNAME",
  "password": "PASSWORD",
  "rotation": {
    "mode": "interval",
    "intervalMinutes": 10
  },
  "minRotationIntervalSeconds": 30,
  "rotationLink": "https://africaproxies.com/api/v1/mobile/mob_2v8k1q/rotate?key=API_KEY",
  "planId": "mob-30d",
  "autoRenew": false,
  "createdAt": "2026-10-05T14:03:11Z",
  "expiresAt": "2026-11-04T14:03:11Z"
}
```

*curl*

```bash
curl -s -X PATCH "https://africaproxies.com/api/v1/mobile/mob_2v8k1q" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rotation":{"mode":"interval","intervalMinutes":10}}'
```

*Python*

```python
import os
import requests

API = "https://africaproxies.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.patch(f"{API}/mobile/mob_2v8k1q", headers=HEADERS, json={"rotation": {"mode": "interval", "intervalMinutes": 10}}, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';

const res = await fetch(`${API}/mobile/mob_2v8k1q`, {
  method: 'PATCH',
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ rotation: { mode: 'interval', intervalMinutes: 10 } }),
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Badilisha IP sasa

`POST /v1/mobile/{portId}/rotate`

Kila ubadilishaji huunganisha porti yako tena na mtoa huduma wa simu ili kupata IP mpya, na kwa kawaida huchukua sekunde 5–15; wakati mwingine mtoa huduma anaweza kurudisha IP ileile: badilisha tena. Si zaidi ya mara moja kila sekunde 30 kwa porti (`minRotationIntervalSeconds`): ombi la mapema sana hurudisha `429 rotation_too_soon` na `Retry-After` (sekunde za kusubiri).

Uthibitishaji: funguo ya API kwenye kichwa cha `Authorization: Bearer API_KEY`.

**Parameta**

| Jina | Katika | Aina | Inahitajika | Maelezo |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Ndiyo | — |

**Jibu** `200 OK`

```json
{
  "ip": "203.0.113.201",
  "previousIp": "203.0.113.77",
  "rotatedAt": "2026-10-05T14:03:11Z",
  "nextRotationAvailableAt": "2026-10-05T14:03:41Z"
}
```

*curl*

```bash
curl -s -X POST "https://africaproxies.com/api/v1/mobile/mob_2v8k1q/rotate" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://africaproxies.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.post(f"{API}/mobile/mob_2v8k1q/rotate", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';

const res = await fetch(`${API}/mobile/mob_2v8k1q/rotate`, {
  method: 'POST',
  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());
```

## Kiungo cha kubadilisha (GET yenye ufunguo wa API kwenye hoja za anwani)

`GET /v1/mobile/{portId}/rotate`

Sawa na `POST`, kwa programu na alamisho: `GET https://africaproxies.com/api/v1/mobile/{portId}/rotate?key=API_KEY`. Ufunguo unahitaji ruhusa ya `proxies`. `format=text` hurudisha IP mpya kama `text/plain`.

Uthibitishaji: funguo ya API katika parameter ya query ya `key` (upeo wa `proxies`), ili kiungo kifanye kazi kutoka kwenye bookmark.

**Parameta**

| Jina | Katika | Aina | Inahitajika | Maelezo |
| --- | --- | --- | --- | --- |
| `key` | query | string | Ndiyo | Ufunguo wako wa API (ruhusa ya `proxies`). |
| `portId` | path | string | Ndiyo | — |
| `format` | query | `json` · `text` | Hapana | chaguo-msingi `json` |

**Jibu** `200 OK`

```json
{
  "ip": "203.0.113.201",
  "previousIp": "203.0.113.77",
  "rotatedAt": "2026-10-05T14:03:11Z",
  "nextRotationAvailableAt": "2026-10-05T14:03:41Z"
}
```

*curl*

```bash
curl -s "https://africaproxies.com/api/v1/mobile/mob_2v8k1q/rotate?key=$API_KEY&format=text"
```

*Python*

```python
import os
import requests

API = "https://africaproxies.com/api/v1"

r = requests.get(f"{API}/mobile/mob_2v8k1q/rotate", params={"key": os.environ["API_KEY"], "format": "text"}, timeout=30)
r.raise_for_status()
print(r.text)
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';

const res = await fetch(`${API}/mobile/mob_2v8k1q/rotate?key=${process.env.API_KEY}&format=text`);
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.text());
```

## Tengeneza nenosiri jipya la proxy kwa porti

`POST /v1/mobile/{portId}/reset-password`

Uthibitishaji: funguo ya API kwenye kichwa cha `Authorization: Bearer API_KEY`.

**Parameta**

| Jina | Katika | Aina | Inahitajika | Maelezo |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Ndiyo | — |

**Jibu** `200 OK`

```json
{
  "id": "mob_2v8k1q",
  "label": "AE Etisalat #1",
  "status": "active",
  "country": "AE",
  "city": null,
  "carrier": "etisalat",
  "carrierName": "Etisalat",
  "networkType": "4G",
  "currentIp": "203.0.113.201",
  "ipChangedAt": "2026-10-05T14:03:11Z",
  "endpoint": {
    "host": "gw.africaproxies.com",
    "httpPort": 7777,
    "socksPort": 7778
  },
  "username": "USERNAME",
  "password": "PASSWORD",
  "rotation": {
    "mode": "interval",
    "intervalMinutes": 10
  },
  "minRotationIntervalSeconds": 30,
  "rotationLink": "https://africaproxies.com/api/v1/mobile/mob_2v8k1q/rotate?key=API_KEY",
  "planId": "mob-30d",
  "autoRenew": false,
  "createdAt": "2026-10-05T14:03:11Z",
  "expiresAt": "2026-11-04T14:03:11Z"
}
```

*curl*

```bash
curl -s -X POST "https://africaproxies.com/api/v1/mobile/mob_2v8k1q/reset-password" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://africaproxies.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.post(f"{API}/mobile/mob_2v8k1q/reset-password", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';

const res = await fetch(`${API}/mobile/mob_2v8k1q/reset-password`, {
  method: 'POST',
  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());
```

## Data za kila siku kupitia porti (kwa taarifa: data bila kikomo, kwa matumizi ya haki)

`GET /v1/mobile/{portId}/usage`

Kwa taarifa tu. Data bila kikomo kwenye porti yako maalumu, kwa matumizi ya haki: mtoa huduma anaweza kupunguza kasi au kusimamisha kwa muda matumizi mazito sana.

Uthibitishaji: funguo ya API kwenye kichwa cha `Authorization: Bearer API_KEY`.

**Parameta**

| Jina | Katika | Aina | Inahitajika | Maelezo |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Ndiyo | — |
| `from` | query | string (date) | Hapana | Siku ya kwanza (UTC), ikijumuishwa. Chaguo-msingi = siku 29 kabla ya `to`. |
| `to` | query | string (date) | Hapana | Siku ya mwisho (UTC), ikijumuishwa. Chaguo-msingi = leo. Muda usiozidi siku 366. |

**Jibu** `200 OK`

```json
{
  "from": "2026-10-04",
  "to": "2026-10-05",
  "totalBytes": 2350000000,
  "totalRequests": 48210,
  "points": [
    {
      "date": "2026-10-04",
      "bytes": 1200000000,
      "requests": 24800
    },
    {
      "date": "2026-10-05",
      "bytes": 1150000000,
      "requests": 23410
    }
  ],
  "byCountry": [
    {
      "country": "AE",
      "bytes": 2350000000
    }
  ]
}
```

*curl*

```bash
curl -s "https://africaproxies.com/api/v1/mobile/mob_2v8k1q/usage" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://africaproxies.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/mobile/mob_2v8k1q/usage", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';

const res = await fetch(`${API}/mobile/mob_2v8k1q/usage`, {
  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());
```

## Watoa huduma za simu wenye porti za 4G/5G zinazopatikana katika nchi

`GET /v1/catalog/countries/{countryCode}/carriers`

Umma: hakuna API inahitajika.

**Parameta**

| Jina | Katika | Aina | Inahitajika | Maelezo |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Ndiyo | ISO 3166-1 alpha-2, herufi kubwa. |

**Jibu** `200 OK`

```json
{
  "data": [
    {
      "id": "etisalat",
      "name": "Etisalat",
      "networkTypes": [
        "4G",
        "5G"
      ],
      "available": true,
      "cities": []
    }
  ]
}
```

*curl*

```bash
curl -s "https://africaproxies.com/api/v1/catalog/countries/AE/carriers"
```

*Python*

```python
import os
import requests

API = "https://africaproxies.com/api/v1"

r = requests.get(f"{API}/catalog/countries/AE/carriers", timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://africaproxies.com/api/v1';

const res = await fetch(`${API}/catalog/countries/AE/carriers`);
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

---

AfricaProxies: AfricaProxies ni mtoa huduma za proxy za IP za nyumbani kwa Afrika kusini mwa Sahara, zinazolipiwa kwa kripto bila kupakia kitambulisho.
