Export (0) Print
Expand All
Expand Minimize

IWebmasterApi.VerifySite

Namespace: Microsoft.Bing.Webmaster.Api

IWebmasterApi.VerifySite Method

Try to verify user site

Syntax

bool VerifySite(
string siteUrl
)

Parameters

siteUrl
Type: System.String
Site url

Return Value

true if site was successfully verified, false overwise

Examples

XML request sample

POST /webmaster/api.svc/pox/VerifySite?apikey=EEDECC1EA4AE341CC57365E075EBC8B6 HTTP/1.1
Content-Type: application/xml; charset=utf-8
Host: ssl.bing.com
Content-Length: 90

<VerifySite xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Bing.Webmaster.Api">
<siteUrl>http://example.com</siteUrl>
</VerifySite>

XML response sample

HTTP/1.1 200 OK
Content-Length: 83
Content-Type: application/xml; charset=utf-8

<Boolean xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</boolean>

JSON request sample

POST /webmaster/api.svc/json/VerifySite?apikey=EEDECC1EA4AE341CC57365E075EBC8B6 HTTP/1.1
Content-Type: application/json; charset=utf-8
Host: ssl.bing.com
Content-Length: 34


{
"siteUrl":"http:\/\/example.com"
}

JSON response sample

HTTP/1.1 200 OK
Content-Length: 10
Content-Type: application/json; charset=utf-8


{
"d":true
}

 

Exception Condition

Microsoft.Bing.Webmaster.Api.ApiException

Thrown with error code InvalidUrl if url is not valid.

Microsoft.Bing.Webmaster.Api.ApiException

Thrown with error code NotAuthorized if the site was not added to user site list.

See Also

Show:
© 2014 Microsoft