> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# VerifySite

# Package: bingWebmasterTools

# Namespace: BwtService

# Method link: https://dev.wix.com/docs/api-reference/business-management/seo/bing-webmaster-tools/site-readiness-v1/verify-site.md

## Permission Scopes:
Manage SEO Settings: SCOPE.PROMOTE.MANAGE-SEO

## Introduction

Verifies ownership of the site with Bing.

No parameter is needed: Wix adds the `msvalidate.01` meta tag to every
page of the site, then asks Bing to confirm it. Add the site with Add
Site first, because Bing verifies only sites already in the account.

Verification requires a connected Bing account and runs synchronously
against Bing, so allow up to a minute for the call to return.

Requires the site to be published, have a connected domain, and allow
search-engine indexing; otherwise fails with `FAILED_PRECONDITION`.

---

## REST API

### Schema

```
 Method: verifySite
 Description: Verifies ownership of the site with Bing.  No parameter is needed: Wix adds the `msvalidate.01` meta tag to every page of the site, then asks Bing to confirm it. Add the site with Add Site first, because Bing verifies only sites already in the account.  Verification requires a connected Bing account and runs synchronously against Bing, so allow up to a minute for the call to return.  Requires the site to be published, have a connected domain, and allow search-engine indexing; otherwise fails with `FAILED_PRECONDITION`.
 URL: https://www.wixapis.com/gsc/connection/v1/bing/verify-site
 Method: POST
 Method parameters:
   param name: method | type: VerificationMethod    
      - enum:
           UNKNOWN_VERIFICATION_METHOD - Unknown verification method.
           META - Verification via an `msvalidate.01` meta tag, which Wix places on every
page of the site. Wix hosts the site's pages, so this is the method that
needs nothing from the Wix user.
 Return type: VerifySiteResponse
  EMPTY-OBJECT {}

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: BWT_CONNECTION_EXPIRED | Description: The site's Bing verification was cleared, or the Bing account was disconnected, while this call ran, so the call verified nothing (and removed its own tag from a Wix site). Connect again, then call Verify Site.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: MISSING_VERIFICATION | Description: Bing didn't find the verification tag on the site's home page. Retry once the tag is in place.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: SITE_NOT_INDEXABLE | Description: The site does not allow search-engine indexing.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: DOMAIN_NOT_CONNECTED | Description: The site has no connected domain.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: SITE_NOT_PUBLISHED | Description: The site is not published.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: MISSING_TOKEN | Description: No Bing account is connected for this site. Connect one with the BWT Connection API first.
   HTTP Code: 429 | Status Code: RESOURCE_EXHAUSTED | Application Code: BING_QUOTA_EXCEEDED | Description: Bing throttled the request. Retry after the throttling window.
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: BWT_SITE_BUSY | Description: Another Bing Webmaster Tools operation is running on this site. Retry.
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: META_TAGS_WRITE_CONFLICT | Description: Another request changed the site's meta tags at the same time. Retry.
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: BING_UNAVAILABLE | Description: Bing answered with a temporary server error. Retry with backoff.


```

### Examples

### Verify Site
```curl
curl -X POST \
'https://www.wixapis.com/bwt/v1/bing/verify-site' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "method": "META"
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.bwt.siteReadiness.verifySite(options)
 Description: Verifies ownership of the site with Bing.  No parameter is needed: Wix adds the `msvalidate.01` meta tag to every page of the site, then asks Bing to confirm it. Add the site with Add Site first, because Bing verifies only sites already in the account.  Verification requires a connected Bing account and runs synchronously against Bing, so allow up to a minute for the call to return.  Requires the site to be published, have a connected domain, and allow search-engine indexing; otherwise fails with `FAILED_PRECONDITION`.
 Method parameters:
   param name: options | type: VerifySiteOptions  none  
        - name: method | type: VerificationMethod | description: Verification method to use. `META` is the only supported method and the default, so this field can be omitted.  
             - enum:
             -     UNKNOWN_VERIFICATION_METHOD: Unknown verification method.
             -     META: Verification via an `msvalidate.01` meta tag, which Wix places on every page of the site. Wix hosts the site's pages, so this is the method that needs nothing from the Wix user.
 Return type: PROMISE<VerifySiteResponse>
  EMPTY-OBJECT {}

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: BWT_CONNECTION_EXPIRED | Description: The site's Bing verification was cleared, or the Bing account was disconnected, while this call ran, so the call verified nothing (and removed its own tag from a Wix site). Connect again, then call Verify Site.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: MISSING_VERIFICATION | Description: Bing didn't find the verification tag on the site's home page. Retry once the tag is in place.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: SITE_NOT_INDEXABLE | Description: The site does not allow search-engine indexing.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: DOMAIN_NOT_CONNECTED | Description: The site has no connected domain.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: SITE_NOT_PUBLISHED | Description: The site is not published.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: MISSING_TOKEN | Description: No Bing account is connected for this site. Connect one with the BWT Connection API first.
   HTTP Code: 429 | Status Code: RESOURCE_EXHAUSTED | Application Code: BING_QUOTA_EXCEEDED | Description: Bing throttled the request. Retry after the throttling window.
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: BWT_SITE_BUSY | Description: Another Bing Webmaster Tools operation is running on this site. Retry.
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: META_TAGS_WRITE_CONFLICT | Description: Another request changed the site's meta tags at the same time. Retry.
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: BING_UNAVAILABLE | Description: Bing answered with a temporary server error. Retry with backoff.


```

### Examples

### Verify the site's ownership with Bing
```javascript
import { siteReadiness } from "@wix/bwt";

async function verifySite() {
  await siteReadiness.verifySite({ method: "META" });
}

```

### verifySite (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { siteReadiness } from '@wix/bwt';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { siteReadiness },
  // Include the auth strategy and host as relevant
});


async function verifySite(options) {
  const response = await myWixClient.siteReadiness.verifySite(options);
};
```

---