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}/hosts/{host-id}/verification
|
|
Type: |
|
|
Type: |
Response format
Examples
JSONXML{ "verification_uin": "b01288afe67b1595", "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", ... ] }<Data> <verification_uin>b01288afe67b1595</verification_uin> <verification_state>NONE</verification_state> <verification_type>META_TAG</verification_type> <latest_verification_time>2016-01-01T00:00:00,000+0300</latest_verification_time> <fail_info> <reason>META_TAG_NOT_FOUND</reason> <message>explicit error message</message> </fail_info> <applicable_verifier>META_TAG</applicable_verifier> ... </Data>
Name
Required
Type
Description
verification_uinYes
stringUnique authorization code.
verification_stateYes
string(ApiVerificationState)The rights verification state.
verification_typeYes
string(ApiVerificationType)The type of rights verification.
latest_verification_timeYes
datetimeThe time of the last check in the
yyyy-MM-ddTHH:mm:ss,sssZformat (ifverification_stateisn'tNONE).
fail_infoYes
Error description if the
VERIFICATION_FAILEDstatus is received.
reasonYes
string(ApiVerificationFailReason)The reason why verification failed.
messageYes
stringError description for users.
applicable_verifiersYes
string(ApiExplicitVerificationType )The verification methods applied for the given site.
Rights verification methods (ApiVerificationType)
|
Verification method |
Whether a verification check can be requested |
Description |
|
|
No |
Automatic rights verification (deprecated; only for *.narod.ru sites). |
|
|
No |
Rights were delegated. |
|
|
Yes |
Verifying rights with the DNS record. |
|
|
Yes |
Placing an HTML file in the site's root directory. |
|
|
Yes |
Adding a meta tag to the site's home page header. |
|
|
No |
Rights verification via Yandex.Mail for Domains. |
|
|
No |
Placing a text file in the site's root directory. |
Explicit methods of rights verification (ApiExplicitVerificationType)
|
Verification method |
Whether a verification check can be requested |
Description |
|
|
Yes |
Verifying rights with the DNS record. |
|
|
Yes |
Placing an HTML file in the site's root directory. |
|
|
Yes |
Adding a meta tag to the site's home page header. |
The status of verifying the right to manage the site (ApiVerificationState)
|
Status |
Description |
|
|
Verification wasn't completed and rights are not confirmed. |
|
|
The rights are verified. |
|
|
The rights verification is in progress. |
|
|
Verification was performed but rights are not confirmed. |
|
|
An unexpected error occurred when verifying the rights. |
Reasons for refusal to verify site management rights (ApiVerificationFailReason)
|
Reason for refusal |
Description |
|
|
Delegation of site management rights was canceled. |
|
|
The specified DNS record doesn't exist. |
|
|
The meta tag is missing in the site's home page header. |
|
|
Verification of site management rights via Yandex.Mail for Domain isn't allowed for this site. |
|
|
The HTML file content is set incorrectly. |
Response codes
To view the response structure in detail, click the reason.
|
Code |
Reason |
Description |
|
200 |
OK |
|
|
403 |
The ID of the user who issued the token differs from the one specified in the request. In the examples below, JSON
XML
|
|
|
404 |
The site is not in the list of the user's sites. JSON
XML
|
Related information
Type: int64. User ID. Required when calling all Yandex.Webmaster API resources. To get it, use the GET /v4/user method.
Type: host id (string). The site ID. To get it, use the GET /v4/user/{user-id}/hosts method.
Required
Yes
Type
string
Description
Unique authorization code.
Required
Yes
Type
string (ApiVerificationState)
Description
The rights verification state.
Required
Yes
Type
string (ApiVerificationType)
Description
The type of rights verification.
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).
Required
Yes
Type
Description
Error description if the VERIFICATION_FAILED status is received.
Required
Yes
Type
string (ApiVerificationFailReason)
Description
The reason why verification failed.
Required
Yes
Type
string
Description
Error description for users.
The status of verifying the right to manage the site (ApiVerificationState)
|
Status |
Description |
|
|
Verification wasn't completed and rights are not confirmed. |
|
|
The rights are verified. |
|
|
The rights verification is in progress. |
|
|
Verification was performed but rights are not confirmed. |
|
|
An unexpected error occurred when verifying the rights. |
Rights verification methods (ApiVerificationType)
|
Verification method |
Whether a verification check can be requested |
Description |
|
|
No |
Automatic rights verification (deprecated; only for *.narod.ru sites). |
|
|
No |
Rights were delegated. |
|
|
Yes |
Verifying rights with the DNS record. |
|
|
Yes |
Placing an HTML file in the site's root directory. |
|
|
Yes |
Adding a meta tag to the site's home page header. |
|
|
No |
Rights verification via Yandex.Mail for Domains. |
|
|
No |
Placing a text file in the site's root directory. |
Reasons for refusal to verify site management rights (ApiVerificationFailReason)
|
Reason for refusal |
Description |
|
|
Delegation of site management rights was canceled. |
|
|
The specified DNS record doesn't exist. |
|
|
The meta tag is missing in the site's home page header. |
|
|
Verification of site management rights via Yandex.Mail for Domain isn't allowed for this site. |
|
|
The HTML file content is set incorrectly. |
Explicit methods of rights verification (ApiExplicitVerificationType)
|
Verification method |
Whether a verification check can be requested |
Description |
|
|
Yes |
Verifying rights with the DNS record. |
|
|
Yes |
Placing an HTML file in the site's root directory. |
|
|
Yes |
Adding a meta tag to the site's home page header. |
Description
Error code.
Description
ID of the user who allowed access.
Description
ID of the requested site.
Description
Error message.