# Portas móveis e rotação IP

> API AfricaProxies: portas 4G/5G, rotação IP imediata, agendada ou por ligação e tráfego diário. Parâmetros, respostas e código curl, Python e Node.js.

- URL: https://africaproxies.com/pt/docs/api/mobile/
- Última atualização: 2026-10-15
- Editor: AfricaProxies (https://africaproxies.com)

Portas 4G/5G dedicadas: altere o IP agora ou por temporizador, utilize a ligação de rotação e consulte o tráfego diário.

**Endpoints nesta página**

- `GET /v1/mobile`: Listar portas móveis
- `GET /v1/mobile/{portId}`: Obter uma porta móvel
- `PATCH /v1/mobile/{portId}`: Alterar o nome, ativar/desativar a renovação automática ou configurar a rotação automática
- `POST /v1/mobile/{portId}/rotate`: Mudar o IP agora
- `GET /v1/mobile/{portId}/rotate`: Ligação de rotação (GET com chave API na cadeia de consulta)
- `POST /v1/mobile/{portId}/reset-password`: Gerar uma nova palavra-passe de proxy para a porta
- `GET /v1/mobile/{portId}/usage`: Tráfego diário pela porta (informativo: dados ilimitados, sob utilização justa)
- `GET /v1/catalog/countries/{countryCode}/carriers`: Operadores móveis com portas 4G/5G disponíveis num país

URL base `https://africaproxies.com/api/v1`. Autenticação, erros e limites: consulte a [visão geral da API](/pt/docs/api/).

## Listar portas móveis

`GET /v1/mobile`

Autenticação: API chave no cabeçalho `Authorization: Bearer API_KEY`.

**Resposta** `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());
```

## Obter uma porta móvel

`GET /v1/mobile/{portId}`

Autenticação: API chave no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sim | — |

**Resposta** `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());
```

## Alterar o nome, ativar/desativar a renovação automática ou configurar a rotação automática

`PATCH /v1/mobile/{portId}`

Altere o nome da porta, ative ou desative a renovação automática ou defina um temporizador de rotação automática, de cada 2 minutos a cada 24 horas: `"rotation": { "mode": "interval", "intervalMinutes": 10 }` (2–1440 minutos); `"mode": "manual"` desativa-o. Caso contrário, a porta mantém o seu IP até o rodar, embora o operador possa alterá-lo por iniciativa própria de tempos a tempos.

Autenticação: API chave no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sim | — |

**Corpo da requisição**

| Campo | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- |
| `label` | string | Não | máx. 60 caracteres |
| `autoRenew` | boolean | Não | — |
| `rotation` | object | Não | Temporizador de rotação automática: `{ "mode": "interval", "intervalMinutes": 2–1440 }` (de cada 2 minutos a cada 24 horas), ou `{ "mode": "manual", "intervalMinutes": null }` para rodar apenas a pedido. |

*Exemplo: Rotação automática*

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

*Exemplo: Manual*

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

**Resposta** `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());
```

## Mudar o IP agora

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

Cada rotação volta a ligar a porta ao operador para obter um novo IP e demora normalmente 5–15 segundos; ocasionalmente, o operador pode devolver o mesmo IP: basta rodar novamente. No máximo uma vez a cada 30 segundos por porta (`minRotationIntervalSeconds`): uma rotação pedida demasiado cedo devolve `429 rotation_too_soon` com `Retry-After` (segundos a aguardar).

Autenticação: API chave no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sim | — |

**Resposta** `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());
```

## Ligação de rotação (GET com chave API na cadeia de consulta)

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

Igual a `POST`, para scripts e marcadores: `GET https://africaproxies.com/api/v1/mobile/{portId}/rotate?key=API_KEY`. A chave necessita da permissão `proxies`. `format=text` devolve o novo IP como `text/plain`.

Autenticação: chave API no parâmetro de consulta `key` (escopo `proxies`), portanto o link funciona a partir de um marcador.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `key` | query | string | Sim | A sua chave API (permissão `proxies`). |
| `portId` | path | string | Sim | — |
| `format` | query | `json` · `text` | Não | predefinição `json` |

**Resposta** `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());
```

## Gerar uma nova palavra-passe de proxy para a porta

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

Autenticação: API chave no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sim | — |

**Resposta** `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());
```

## Tráfego diário pela porta (informativo: dados ilimitados, sob utilização justa)

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

Apenas informativo. Dados ilimitados na sua porta dedicada, sob utilização justa: o operador pode abrandar ou suspender utilizações muito intensivas.

Autenticação: API chave no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sim | — |
| `from` | query | string (date) | Não | Primeiro dia (UTC), inclusive. Predefinição = 29 dias antes de `to`. |
| `to` | query | string (date) | Não | Último dia (UTC), inclusive. Predefinição = hoje. Intervalo máximo de 366 dias. |

**Resposta** `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());
```

## Operadores móveis com portas 4G/5G disponíveis num país

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

Público: não é necessária uma chave API.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Sim | ISO 3166-1 alpha-2, em maiúsculas. |

**Resposta** `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 é um fornecedor de proxies residenciais para a África Subsaariana, com pagamento em cripto e sem envio de documento de identificação.
