/auth/getTokenPublicGet JWT token
Public endpoint. Does not require prior authentication. The JWT token must be sent in subsequent requests. Supports rate limiting by IP and username.
Request body · application/json
| Name | Type | Req. | Description |
|---|---|---|---|
username | string | Yes | Username or account email |
pass | string | Yes | Password |
rememberMe | boolean | No | If true, the token lasts up to 365 days. Default: false |
locale | string | No | Language code: "en" or "es". Default: "es" |
Example
curl -X POST "https://envios.arrobamail.com/v3/api/auth/getToken" \
-H "Content-Type: application/json" \
-d '{
"username": "...",
"pass": "...",
"rememberMe": true,
"locale": "..."
}'Response 200
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": 1234,
"uname": "usuario_ejemplo",
"email": "[email protected]",
"role": "user",
"lang": "es"
}
}Errors
| Status | Code | Description |
|---|---|---|
| 500 | rate_limit | User or IP blocked for exceeding the rate limit |
| 412 | account_suspended | The account is suspended |
| 404 | invalid_credentials | Invalid credentials |