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 |
|---|---|
|
Thrown with error code InvalidUrl if url is not valid. |
|
|
Thrown with error code NotAuthorized if the site was not added to user site list. |
See Also
Show: