# Verify Voice

To perform the user’s biometric voice verification, the method to be used is Verify Voice. Similar to the enrollment process, the first request to this method will start the verification process, returning the voice sample expected to be present on the next request ( not expecting any file on the first request ). This process may need more than one request depending on the quality and acceptance of the sample provided. In case of success, the system will respond that the user is verified for this kind of biometric operation. In case of failure, it’s necessary to repeat the process until the verification step is completed.

![](https://documents.lucidchart.com/documents/fbac3aa4-7b24-4126-9f04-d90c949eb342/pages/0_0?a=5069\&x=-27\&y=-3299\&w=1265\&h=414\&store=1\&accept=image%2F*\&auth=LCA%20023b43b54f78d9bfcd78ae0cf1239d076033f092-ts%3D1543258780)

## Verify Voice

<mark style="color:green;">`POST`</mark> `Https://api.biometrid.com/api/1.1/users/:userId/dialogue/verify/voice`

Verify user's voice on client's chosen provider

#### Path Parameters

| Name   | Type   | Description       |
| ------ | ------ | ----------------- |
| userID | string | BiometrID user ID |

#### Headers

| Name               | Type   | Description                                                                                                                                             |
| ------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Content-type       | string | Request content type (This is not required to be set. Referenced only to show how we expect data to be sent). { "Content-Type": "multipart/form-data" } |
| x-biometrid-key    | string | <p>Application Client Key<br></p>                                                                                                                       |
| x-biometrid-secret | string | Application Client Secret                                                                                                                               |

#### Request Body

| Name  | Type   | Description                                                        |
| ----- | ------ | ------------------------------------------------------------------ |
| audio | object | Audio file with the voice biometrid sample. (only **.wav** format) |

{% tabs %}
{% tab title="200 Success 200 types" %}
{% tabs %}
{% tab title="HTTP/1.1 200 OK" %}
```javascript
//Audio Verified
{
    "status": true,
    "data": {
        "message": "AUDIO_RECOGNIZED_WITH_SUCCESS",
        "verified": true
    }
}

//Voice Verification Failed
{
    "status": false,
    "data": {
        "message": "AUDIO_RECOGNITION_FAILED"
     }
}
```
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="400 Bad Request types" %}
{% tabs %}
{% tab title="HTTP/1.1 400 Bad Request" %}
```javascript
//No audio file detected on request. Not sent or invalid format.
{
    "status": false,
    "data": {
        "message": "NO_FILE_OR_INVALID_FORMAT"
    }
}
//User voice not enroled on this provider.
{
    "status": false,
    "data": {
        "message": "ENROLL_USER_VOICE_FIRST"
    }
}
// Missing Headers
{
    "status": false,
    "data": {
        "message": "AUTHENTICATION_HEADERS_MISSING"
    }
}
```
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="401 Invalid Headers." %}
{% tabs %}
{% tab title="HTTP/1.1 401 Unauthorized" %}
```javascript
{
    "status": false,
    "data": {
        "message": "INVALID_AUTHENTICATION_HEADERS"
    }
}
```
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="402 Payment Required - Request Limit Reached for Client Plan." %}
{% tabs %}
{% tab title="HTTP/1.1 402 Payment Required" %}
```javascript
{
    "status": false,
    "data": {
        "message": "REQUEST_LIMIT_REACHED"
    }
}
```
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="404 Not Found request types" %}
{% tabs %}
{% tab title="HTTP/1.1 404 Not Found" %}
```javascript
// No active engine configuration for this provider.
{
    "status": false,
    "data": {
        "message": "NO_VOICE_ENGINE_CONFIGURATION_AVAILABLE"
    }
}
 // User's id not exists in biometrid environment.
{
    "status": false,
    "data": {
        "message": "USERID_NOT_EXISTS"
    }
}
//Client not found by given key.
{
    "status": false,
    "data": {
        "message": "CLIENT_NOT_FOUND/CHECK_AUTHENTICATION_HEADERS"
    }
}
```
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

