Authentication
The POST /api/auth/v2 endpoint authenticates a user and issues a secure Bearer token granting access to protected banking features and services. Submit valid credentials in the request body to receive a token that must be included in the Authorization header of all subsequent API calls. The token has a lifetime of 10 minutes and can be refreshed via the token refresh endpoint before expiry.
Endpoint
POST /api/auth/v2
Authentication
This endpoint does not require a prior Bearer token — it is the token-issuing endpoint itself. No Authorization header is needed for this request.
When to use
Call this endpoint at the start of every API session to obtain a Bearer token before making any other requests. Use it again when the current token has expired or is about to expire to avoid interruptions in service. It is also used when a new device registers with the platform and requires a device-bound token.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| likev1 | boolean | No | When true, returns a response in v1-compatible format. Defaults to false. |
Request Body
The request body accepts one of two schemas: a standard token request or a token request with CAPTCHA verification.
Standard token request (banking.business.auth.tokenrequest)
| Field | Type | Required | Description |
|---|---|---|---|
| nickName | string | Yes | The username (nickname) of the authenticating user. Minimum length: 1. |
| password | string | Yes | The user's password. Minimum length: 1. |
| tokenDevice | string | Yes | A unique token identifying the device making the request. Minimum length: 1. |
| nameDevice | string | Yes | A human-readable name for the device (e.g., "iPhone 14 Pro"). Minimum length: 1. |
| reCaptchaResponse | string | No | reCAPTCHA response string from the client-side challenge, if applicable. |
| smsCode | string | No | One-time SMS verification code for multi-factor authentication, if required. |
| typeOperation | string | No | MFA type. Allowed values: ShortMessageCode, TimeBasedCode, LegacyTimeBasedCode. |
With CAPTCHA (banking.business.auth.captchatokenrequest)
Extends the standard token request with an additional captcha object:
| Field | Type | Required | Description |
|---|---|---|---|
| captcha | object | No | CAPTCHA verification payload. |
| captcha.token | string | No | The CAPTCHA token string returned by the CAPTCHA provider. |
{
"nickName": "jsmith",
"password": "P@ssw0rd!",
"tokenDevice": "d3f1a2b4-8e67-4c91-b0d5-2f3e1a9c7b84",
"nameDevice": "Partner Server Node 1",
"smsCode": "847201",
"typeOperation": "ShortMessageCode"
}With CAPTCHA:
{
"nickName": "jsmith",
"password": "P@ssw0rd!",
"tokenDevice": "d3f1a2b4-8e67-4c91-b0d5-2f3e1a9c7b84",
"nameDevice": "Partner Server Node 1",
"captcha": {
"token": "03AGdBq24PBggV9RZ..."
}
}Response
200 OK
| Field | Type | Description |
|---|---|---|
| token | string | The Bearer token to include in the Authorization header of subsequent requests. |
| expiration | string (date-time) | ISO 8601 timestamp indicating when the token expires (typically 10 minutes from issuance). |
| userId | integer | Internal numeric identifier of the authenticated user. |
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6ImpzbWl0aCIsImlhdCI6MTY5MDAwMDAwMH0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"expiration": "2026-06-08T14:30:00Z",
"userId": 100423
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields (nickName, password, tokenDevice, or nameDevice) or validation error (e.g., empty string for a required field) |
| 401 | Invalid credentials — incorrect nickName or password |
| 403 | Account locked, suspended, or MFA challenge failed |
| 404 | User account not found for the given nickName |
| 500 | Internal server error |
Common Mistakes
- Omitting
tokenDeviceornameDevice— both are required fields even for server-to-server integrations; use a stable UUID and a descriptive label. - Sending
Authorization: Bearer {token}on this endpoint — this request does not require a prior token and the header is ignored. - Reusing a token after it has expired (10-minute lifetime) instead of calling this endpoint again or using
POST /api/auth/refresh. - Not including the MFA
smsCodewhen the account has multi-factor authentication enabled, resulting in a 401 or 403 error. - Passing
typeOperationwithout the correspondingsmsCodeor TOTP code, or vice versa.
Related Endpoints
POST /api/auth/refresh— Refresh an existing Bearer token before it expires to maintain uninterrupted API access.
Example
curl -X POST https://api.banking.netevia.dev/api/auth/v2 \
-H "Content-Type: application/json" \
-d '{
"nickName": "jsmith",
"password": "P@ssw0rd!",
"tokenDevice": "d3f1a2b4-8e67-4c91-b0d5-2f3e1a9c7b84",
"nameDevice": "Partner Server Node 1"
}'