Set Authenticator as MFA
This endpoint registers a time-based one-time password (TOTP) authenticator application as the multi-factor authentication (MFA) method for a user. The caller must supply valid credentials along with a device token and device name that identify the authenticator being enrolled. An optional CAPTCHA token can be included when the request originates from a web client that enforces bot protection.
Endpoint
POST /api/auth/v2/authenticator
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token} Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint when onboarding a user who wants to switch from SMS-based verification to an authenticator app (such as Google Authenticator or Authy) for MFA. This is also the appropriate call when a user replaces their device and needs to re-register a new authenticator. Partners building security settings screens should call this endpoint after the user scans the QR code and confirms their first TOTP code.
Request Body
The request body accepts one of two schemas: a base token request (banking.business.auth.tokenrequest) or an extended captcha token request (banking.business.auth.captchatokenrequest) that adds a captcha object. All fields from the base schema apply in both cases.
| Field | Type | Required | Description |
|---|---|---|---|
| nickName | string | Yes | Display name or username of the account holder. Minimum 1 character. |
| password | string | Yes | Account password for the user. Minimum 1 character. |
| tokenDevice | string | Yes | The TOTP secret or device token generated by the authenticator app. Minimum 1 character. |
| nameDevice | string | Yes | Human-readable name for the device being registered (e.g., "iPhone 15 Authenticator"). Minimum 1 character. |
| reCaptchaResponse | string | No | reCAPTCHA v2/v3 response token, if bot protection is enforced on the client. |
| smsCode | string | No | One-time SMS verification code if SMS confirmation is required before enrolling the authenticator. |
| typeOperation | string | No | Specifies the verification type. Allowed values: ShortMessageCode, TimeBasedCode, LegacyTimeBasedCode. |
| captcha.token | string | No | CAPTCHA token from a CAPTCHA provider (included only when using the captchatokenrequest variant). |
Base request example (no CAPTCHA):
{
"nickName": "jane.doe",
"password": "S3cur3P@ssw0rd!",
"tokenDevice": "JBSWY3DPEHPK3PXP",
"nameDevice": "iPhone 15 Authenticator",
"smsCode": "847291",
"typeOperation": "TimeBasedCode"
}Extended request example (with CAPTCHA):
{
"nickName": "jane.doe",
"password": "S3cur3P@ssw0rd!",
"tokenDevice": "JBSWY3DPEHPK3PXP",
"nameDevice": "iPhone 15 Authenticator",
"smsCode": "847291",
"typeOperation": "TimeBasedCode",
"captcha": {
"token": "03AGdBq24PBnE..."
}
}Response
200 OK
A 200 response confirms that the authenticator device was successfully registered as the MFA method for the account. The response body for this endpoint returns a success status without a structured payload.
{}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields (nickName, password, tokenDevice, or nameDevice) or validation error (e.g., empty string where minLength 1 is required) |
| 401 | Bearer token missing, expired, or invalid |
| 403 | Authenticated user does not have permission to modify MFA settings for the target account |
| 404 | Account associated with the provided credentials not found |
| 500 | Internal server error |
Common Mistakes
- Omitting
tokenDevice— this is the TOTP secret from the authenticator app and is required; do not confuse it with the SMS code. - Sending an empty string for any required field — all four required fields enforce
minLength: 1, so blank values will fail validation. - Using an expired Bearer token — the token lifetime is 10 minutes; refresh via
POST /api/auth/refreshbefore calling this endpoint. - Setting
typeOperationtoShortMessageCodewithout providingsmsCode— if SMS confirmation is part of the enrollment flow, both fields must be present. - Including
captchain the body without using thecaptchatokenrequestschema variant — ensure the content type and body structure match the intended schema.
Related Endpoints
POST /api/auth/v2— Obtain a Bearer token by authenticating with username, password, and partnerIdPOST /api/auth/refresh— Refresh an existing Bearer token before it expiresPOST /api/auth/v2/sms— Set SMS as the MFA method instead of an authenticator app
Example
curl -X POST https://api.banking.netevia.dev/api/auth/v2/authenticator \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"nickName": "jane.doe",
"password": "S3cur3P@ssw0rd!",
"tokenDevice": "JBSWY3DPEHPK3PXP",
"nameDevice": "iPhone 15 Authenticator",
"smsCode": "847291",
"typeOperation": "TimeBasedCode"
}' 200Success
