# User authentication code

## API actions

API path: `/user/auth/code`.

### resend

Resends an authentication code for multi-factor authentication to the email specified at the registration.\
This action has a special rate-limit in 5 minutes to avoid abuse.

#### example

cURL

```sh
curl -X POST 'https://api.eu.navixy.com/v2/user/auth/code/resend' \
    -H 'Authorization: NVX 22eac1c27af4be7b9d04da2ce1af111b'
```

#### response

```json
{
  "success": true
}
```

***

### verify

Verifies given authentication code as a part in multi-factor authentication.\
On successful verification, you'll receive a normal session hash.

#### parameters

| name | description                       | type   |
| ---- | --------------------------------- | ------ |
| code | An authentication code to verify. | string |

#### example

cURL

```sh
curl -X POST 'https://api.eu.navixy.com/v2/user/auth/code/verify' \
    -H 'Authorization: NVX 22eac1c27af4be7b9d04da2ce1af111b' \
    -H 'Content-Type: application/json' \
    -d '{ "code": "123456" }'
```

#### response

```json
{
  "success": true,
  "hash": "22eac1c27af4be7b9d04da2ce1af111b"
}
```

* `hash` - string. Session hash.

#### errors

* 282 – Wrong authentication code.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://navixy.com/docs/navixy-api/user-api/backend-api/resources/commons/user/auth/code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
