---
metadata:
  - name: generator
    content: Diplodoc Platform v5.44.0
alternate:
  - https://yandex.com/dev/webmaster/doc/en/reference/host-verification-get.md
  - https://yandex.com/dev/webmaster/doc/ru/reference/host-verification-get.md
keywords:
  - s
  - i
  - t
  - e
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/webmaster/doc/en/llms.txt


# Getting the site verification information

Returns information about the current state of site verification in Yandex.Webmaster.

## Request format

```
GET https://api.webmaster.yandex.net/v4/user/{[user-id](*user-id)}/hosts/{[host-id](*host-id)}/verification
```



#|
||
`user-id`
|
<!-- source: en/_includes/popups.md -->
Type: `int64`. User ID. Required when calling all Yandex.Webmaster API resources. To get it, use the [GET /v4/user](https://yandex.com/dev/webmaster/doc/en/reference/user.md) method.
<!-- endsource: en/_includes/popups.md -->
||
||
`host-id`
|
<!-- source: en/_includes/popups.md -->
Type: `host id (string)`. The site ID. To get it, use the [GET /v4/user/{user-id}/hosts](https://yandex.com/dev/webmaster/doc/en/reference/hosts.md) method.
<!-- endsource: en/_includes/popups.md -->
||
|#

## Response format

### Examples

> 
> {% list tabs %}
> 
> - JSON
> 
>   
>   ```javascript
>   {
>     "verification_uin": "b01288afe67b1595",
>     "verification_state": "[NONE](*NONE)",
>     "verification_type": "[META_TAG](*META_TAG)",
>     "latest_verification_time": "2016-01-01T00:00:00,000+0300",
>     "fail_info": {
>       "reason": "[META_TAG_NOT_FOUND](*META_TAG_NOT_FOUND)",
>       "message": "explicit error message"
>     },
>     "applicable_verifiers": [
>       "META_TAG", ...
>     ]
>   }
>   ```
>   
> 
> - XML
> 
>   
>   ```xml
>   <Data>
>       <[verification_uin](*verification_uin)>b01288afe67b1595</verification_uin>
>       <[verification_state](*verification_state)>[NONE](*NONE)</verification_state>
>       <[verification_type](*verification_type_desc)>[META_TAG](*META_TAG)</verification_type>
>       <[latest_verification_time](*latest_verification_time)>2016-01-01T00:00:00,000+0300</latest_verification_time>
>       <[fail_info](*fail_info)>
>           <[reason](*reason)>[META_TAG_NOT_FOUND](*META_TAG_NOT_FOUND)</reason>
>           <[message](*message)>explicit error message</message>
>       </fail_info>
>       <applicable_verifier>[META_TAG](*META_TAG_XML)</applicable_verifier>
>       ...
>   </Data>
>   ```
> 
> {% endlist %}
>
> #|
> || **Name** | **Required** | **Type** | **Description** ||
> || `verification_uin` | Yes | `string` | Unique authorization code. ||
> || `verification_state` | Yes | `string` ([ApiVerificationState](https://yandex.com/dev/webmaster/doc/en/reference/host-verification-get.md#verification-state)) | The rights verification state. ||
> || `verification_type` | Yes | `string` ([ApiVerificationType](https://yandex.com/dev/webmaster/doc/en/reference/host-verification-get.md#verification-type)) | The type of rights verification. ||
> || `latest_verification_time` | Yes | `datetime` | The time of the last check in the `yyyy-MM-ddTHH:mm:ss,sssZ` format (if `verification_state` isn't `NONE`). ||
> || `fail_info` | Yes |  | Error description if the [`VERIFICATION_FAILED`](https://yandex.com/dev/webmaster/doc/en/reference/host-verification-get.md#verification-state) status is received. ||
> || `reason` | Yes | `string` ([ApiVerificationFailReason](https://yandex.com/dev/webmaster/doc/en/reference/host-verification-get.md#verification-fail-reason)) | The reason why verification failed. ||
> || `message` | Yes | `string` | Error description for users. ||
> || `applicable_verifiers` | Yes | `string` ([ApiExplicitVerificationType ](https://yandex.com/dev/webmaster/doc/en/reference/host-verification-get.md#verification-type)) | The verification methods applied for the given site. ||
> |#


<!-- source: en/_includes/reference/verification-type.md -->
### Rights verification methods (ApiVerificationType) {#verification-type}

#|
||
**Verification method** | **Whether a verification check can be requested** | **Description**
||
|| `AUTO` | No | Automatic rights verification (deprecated; only for *.narod.ru sites). ||
|| `DELEGATED` | No | Rights were delegated. ||
|| `DNS` | Yes | Verifying rights with the DNS record. ||
|| `HTML_FILE` | Yes | Placing an HTML file in the site's root directory. ||
|| `META_TAG` | Yes | Adding a meta tag to the site's home page header. ||
|| `PDD` | No | Rights verification via Yandex.Mail for Domains. ||
|| `TXT_FILE` | No | Placing a text file in the site's root directory. ||
|#
<!-- endsource: en/_includes/reference/verification-type.md -->


<!-- source: en/_includes/reference/api-explicit-verification-type.md -->
### Explicit methods of rights verification (ApiExplicitVerificationType) {#api-verification-type-explicit}

#|
||
**Verification method** | **Whether a verification check can be requested** | **Description**
||
||
`DNS` | Yes | Verifying rights with the DNS record.
||
||
`HTML_FILE` | Yes | Placing an HTML file in the site's root directory.
||
||
`META_TAG` | Yes | Adding a meta tag to the site's home page header.
||
|#
<!-- endsource: en/_includes/reference/api-explicit-verification-type.md -->


<!-- source: en/_includes/reference/verification-state.md -->
### The status of verifying the right to manage the site (ApiVerificationState) {#verification-state}

#|
|| **Status** | **Description** ||
|| `NONE` | Verification wasn't completed and rights are not confirmed. ||
|| `VERIFIED` | The rights are verified. ||
|| `IN_PROGRESS` | The rights verification is in progress. ||
|| `VERIFICATION_FAILED` | Verification was performed but rights are not confirmed. ||
|| `INTERNAL_ERROR` | An unexpected error occurred when verifying the rights. ||
|#
<!-- endsource: en/_includes/reference/verification-state.md -->


<!-- source: en/_includes/reference/verification-fail-reason.md -->
### Reasons for refusal to verify site management rights (ApiVerificationFailReason) {#verification-fail-reason}

#|
|| **Reason for refusal** | **Description** ||
|| `DELEGATION CANCELLED` | Delegation of site management rights was canceled. ||
|| `DNS_RECORD_NOT_FOUND` | The specified DNS record doesn't exist. ||
|| `META_TAG_NOT_FOUND` | The meta tag is missing in the site's home page header. ||
|| `PDD_VERIFICATION_CANCELLED` | Verification of site management rights via Yandex.Mail for Domain isn't allowed for this site. ||
|| `WRONG_HTML_PAGE_CONTENT` | The HTML file content is set incorrectly. ||
|#
<!-- endsource: en/_includes/reference/verification-fail-reason.md -->


## Response codes

To view the response structure in detail, click the reason.

#|
||
**Code** | **Reason** | **Description**
||
||
200 | OK | 
||
||
403
|
[INVALID_USER_ID](https://yandex.com/dev/webmaster/doc/en/reference/errors.md#invalid-user-id)
|
The ID of the user who issued the token differs from the one specified in the request. In the examples below, `{user_id}` shows the correct `uid` of the OAuth token owner.

{% list tabs %}

- JSON

  ```json 
  {   
      "error_code": "INVALID_USER_ID",   
      "available_user_id": 1,   
      "error_message": "Invalid user id. {user_id} should be used."
  }
  ```

- XML

  ```xml 
  <Data>     
      <[error_code](*error_code)>INVALID_USER_ID</error_code>     
      <[available_user_id](*available_user_id)>1</available_user_id>     
      <[error_message](*error_message)>Invalid user id. {user_id} should be used.</error_message> 
  </Data>
  ```

{% endlist %}
||
||
404
|
[HOST_NOT_FOUND](https://yandex.com/dev/webmaster/doc/en/reference/errors.md#host-not-found)
|
The site is not in the list of the user's sites.

{% list tabs %}

- JSON

  ```javascript 
  {   
      "error_code": "HOST_NOT_FOUND",   
      "host_id": "http:ya.ru:80",   
      "error_message": "explicit error message"
  }
  ```

- XML

  ```xml 
  <Data>     
      <[error_code](*error_code)>HOST_NOT_FOUND</error_code>     
      <[host_id](*host_id)>http:ya.ru:80</host_id>     
      <[error_message](*error_message)>explicit error message</error_message> 
  </Data>
  ```

{% endlist %}
||
|#

### Related information

- [Error codes and statuses](https://yandex.com/dev/webmaster/doc/en/reference/errors.md)




[*user-id]: Type: `int64`. User ID. Required when calling all Yandex.Webmaster API resources. To get it, use the [GET /v4/user](https://yandex.com/dev/webmaster/doc/en/reference/user.md) method.

[*host-id]: Type: `host id (string)`. The site ID. To get it, use the [GET /v4/user/{user-id}/hosts](https://yandex.com/dev/webmaster/doc/en/reference/hosts.md) method.

[*verification_uin]: **Required**

Yes

**Type**

`string`

**Description**

Unique authorization code.

[*verification_state]: **Required**

Yes

**Type**

`string` ([ApiVerificationState](#verification-state))

**Description**

The rights verification state.

[*verification_type_desc]: **Required**

Yes

**Type**

`string` ([ApiVerificationType](#verification-type))

**Description**

The type of rights verification.

[*latest_verification_time]: **Required**

Yes

**Type**

`datetime`

**Description**

The time of the last check in the `yyyy-MM-ddTHH:mm:ss,sssZ` format (if `verification_state` isn't `NONE`).

[*fail_info]: **Required**

Yes

**Type**

**Description**

Error description if the  [`VERIFICATION_FAILED`](#verification-state) status is received.

[*reason]: **Required**

Yes

**Type**

`string` ([ApiVerificationFailReason](#verification-fail-reason))

**Description**

The reason why verification failed.

[*message]: **Required**

Yes

**Type**

`string`

**Description**

Error description for users.

[*NONE]: ### The status of verifying the right to manage the site (ApiVerificationState) {#verification-state}

#|
|| **Status** | **Description** ||
|| `NONE` | Verification wasn't completed and rights are not confirmed. ||
|| `VERIFIED` | The rights are verified. ||
|| `IN_PROGRESS` | The rights verification is in progress. ||
|| `VERIFICATION_FAILED` | Verification was performed but rights are not confirmed. ||
|| `INTERNAL_ERROR` | An unexpected error occurred when verifying the rights. ||
|#

[*META_TAG]: ### Rights verification methods (ApiVerificationType) {#verification-type}

#|
||
**Verification method** | **Whether a verification check can be requested** | **Description**
||
|| `AUTO` | No | Automatic rights verification (deprecated; only for *.narod.ru sites). ||
|| `DELEGATED` | No | Rights were delegated. ||
|| `DNS` | Yes | Verifying rights with the DNS record. ||
|| `HTML_FILE` | Yes | Placing an HTML file in the site's root directory. ||
|| `META_TAG` | Yes | Adding a meta tag to the site's home page header. ||
|| `PDD` | No | Rights verification via Yandex.Mail for Domains. ||
|| `TXT_FILE` | No | Placing a text file in the site's root directory. ||
|#

[*META_TAG_NOT_FOUND]: ### Reasons for refusal to verify site management rights (ApiVerificationFailReason) {#verification-fail-reason}

#|
|| **Reason for refusal** | **Description** ||
|| `DELEGATION CANCELLED` | Delegation of site management rights was canceled. ||
|| `DNS_RECORD_NOT_FOUND` | The specified DNS record doesn't exist. ||
|| `META_TAG_NOT_FOUND` | The meta tag is missing in the site's home page header. ||
|| `PDD_VERIFICATION_CANCELLED` | Verification of site management rights via Yandex.Mail for Domain isn't allowed for this site. ||
|| `WRONG_HTML_PAGE_CONTENT` | The HTML file content is set incorrectly. ||
|#

[*META_TAG_XML]: ### Explicit methods of rights verification (ApiExplicitVerificationType) {#api-verification-type-explicit}

#|
||
**Verification method** | **Whether a verification check can be requested** | **Description**
||
||
`DNS` | Yes | Verifying rights with the DNS record.
||
||
`HTML_FILE` | Yes | Placing an HTML file in the site's root directory.
||
||
`META_TAG` | Yes | Adding a meta tag to the site's home page header.
||
|#

[*error_code]: **Description**

Error code.

[*available_user_id]: **Description**

ID of the user who allowed access.

[*host_id]: **Description**

ID of the requested site.

[*error_message]: **Description**

Error message.