Getting information about site verification

Description

Gets details about the current state of site verification in Yandex.Webmaster.

Request format

Send a GET request to the address of the resource with information about user site verification:

GET https://api.webmaster.yandex.net/v3/user/{user-id}/hosts/{host-id}/verification/

Path parameters

Name Required Type Default value Description
user-id Yes int64 The user ID.
host-id Yes host id Site ID.

Response format

If successful, the server returns 200 and data about the current state of site verification.

Samples

{
  "verification_uin": "explicit error message",
  "verification_state": "NONE",
  "verification_type": "META_TAG",
  "latest_verification_time": "2016-01-01T00:00:00,000+0300",
  "fail_info": {
    "reason": "META_TAG_NOT_FOUND",
    "message": "explicit error message"
  },
  "applicable_verifiers": [
    "META_TAG", ...
  ]
}
Name Required Type Description
verification_uin Yes string Verification code.
verification_state Yes ApiVerificationState The state of rights verification.
verification_type Yes ApiVerificationType The type of rights verification.
latest_verification_time Yes yyyy-MM-ddTHH:mm:ss,sssZ The time when verification was last performed (if verification_state is not NONE).
fail_info Yes Error description for the status VERIFICATION_FAILED .
reason Yes ApiVerificationFailReason The reason that verification failed.
Message Yes string Error description for users.
applicable_verifiers Yes ApiExplicitVerificationType The verification methods to apply for the selected site.

Methods for verifying rights (ApiVerificationType)

Verification method Whether a verification status check can be requested Description
AUTO No Automatic verification of rights (deprecated; only for *.narod.ru sites).
DELEGATED No Rights were delegated.
DNS Yes Verifying rights using DNS records.
HTML_FILE Yes Placing an HTML file in the site's root directory.
META_TAG Yes Adding a metatag to the header on the site's main page.
PDD No Verifying rights via Yandex.Mail for Domains.
TXT_FILE No Placing a text file in the site's root directory.
WHOIS Yes

Verifying data with the information provided by the WHOIS service.

This method only works for second-level domains (such as example.com).

Explicit methods of verifying rights (ApiExplicitVerificationType)

Verification method Whether a verification status check can be requested Description
DNS Yes Verifying rights using DNS records.
HTML_FILE Yes Placing an HTML file in the site's root directory.
META_TAG Yes Adding a metatag to the header on the site's main page.
WHOIS Yes

Verifying data with the information provided by the WHOIS service.

This method only works for second-level domains (such as example.com).

The status of verifying site management rights (ApiVerificationState)

Status Description
NONE Verification wasn't performed, and site management rights weren't confirmed.
VERIFIED Rights were verified.
IN_PROGRESS Rights are in the process of being verified.
VERIFICATION_FAILED Site management rights were checked, but not confirmed.
INTERNAL_ERROR An unexpected error occurred during verification.

The reasons why site management rights weren't confirmed (ApiVerificationFailReason)

Reason for refusal Description
DELEGATION CANCELLED Canceled delegation of site management rights.
DNS_RECORD_NOT_FOUND The specified DNS record does not exist.
META_TAG_NOT_FOUND Missing metatag in the header on the site's main page.
PDD_VERIFICATION_CANCELLED This site does not allow verifying rights via Mail for Domains.
WHOIS_EMAIL_NOT_FOUND The specified email address does not exist in the WHOIS record for this site.
WRONG_HTML_PAGE_CONTENT Invalid HTML file content.

Errors

403 Forbidden

The user ID for the token doesn't match the one specified in the request. In the examples below, {user_id} is the correct uid for the owner of the OAuth token.

{
  "error_code": "INVALID_USER_ID",
  "available_user_id": 1,
  "error_message": "Invalid user id. {user_id} should be used."
}
Parameter Description
error_code Error code.
available_user_id ID of the user who allowed access.
error_message Error message.

404 Not Found

The site isn't in the list of the user's sites, or rights to the site haven't been verified.

{
  "error_code": "HOST_NOT_FOUND",
  "host_id": "http:ya.ru:80",
  "error_message": "explicit error message"
}
Parameter Description
error_code Error code.
host_id The ID of the requested site.
error_message Error message.