Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

User authentication code

The second step of multi-factor authentication, verifying or resending the emailed code.

When an account has multi-factor authentication enabled, user/auth does not return a usable session. It returns type: "second_factor_required" and a limited hash, and emails a code to the address the account registered with.

These two operations finish that exchange: one verifies the code and returns an ordinary session hash, the other sends the code again.

Both require the multi-factor session hash issued part-way through user/auth, not an ordinary session hash and not an API key.

API actions

API base path: /user/auth/code.

Operations that list no errors of their own return only the general error codes.


Verify auth code

post
/user/auth/code/verify

Complete a multi-factor authentication challenge by submitting the code that was sent to the user.

Requires an MFA session, which is issued part-way through authentication. An ordinary session hash or API key cannot call this operation.

Authorizations
AuthorizationstringRequired

Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.

Body
codestringRequired

The verification code sent to the user.

Responses
200

Authentication completed

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
hashstringOptional

Session hash for the authenticated session.

post/user/auth/code/verify
POST /v2/user/auth/code/verify HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "code": "text"
}
{
  "success": true,
  "hash": "text"
}

Errors

These errors come in addition to the general error codes:

  • 282 - Wrong authentication code.


Resending has its own five-minute rate limit, to prevent abuse.

Resend auth code

post
/user/auth/code/resend

Send the multi-factor authentication code again.

Rate limited to one call every 5 minutes to prevent abuse.

Requires an MFA session, which is issued part-way through authentication. An ordinary session hash or API key cannot call this operation.

Authorizations
AuthorizationstringRequired

Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.

Responses
200

Code resent

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/user/auth/code/resend
POST /v2/user/auth/code/resend HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "success": true
}

Last updated

Was this helpful?