> 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

# GetVerificationToken

# Package: bingWebmasterTools

# Namespace: BwtService

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

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

## Introduction

Retrieves the Bing verification meta tag of the site.

Wix places this tag on the site automatically when Verify Site runs, so
the response is for display only. The tag is issued for the connected
Bing account. It stays on the site after verification, because Bing
rechecks it.

---

## REST API

### Schema

```
 Method: getVerificationToken
 Description: Retrieves the Bing verification meta tag of the site.  Wix places this tag on the site automatically when Verify Site runs, so the response is for display only. The tag is issued for the connected Bing account. It stays on the site after verification, because Bing rechecks it.
 URL: https://www.wixapis.com/gsc/connection/v1/bing/verification-token
 Method: GET
 Return type: GetVerificationTokenResponse
  - name: metaTag | type: string | description: The complete `msvalidate.01` meta tag. For example, `<meta name="msvalidate.01" content="ABC123" />`.  | validation: maxLength 1000
  - name: token | type: string | description: The tag's `content` value alone.  | validation: maxLength 500

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: BWT_CONNECTION_EXPIRED | Description: Reserved: not returned for a Wix site.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: SITE_NOT_INDEXABLE | Description: Reserved: not returned for a Wix site.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: DOMAIN_NOT_CONNECTED | Description: Reserved: not returned for a Wix site.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: SITE_NOT_PUBLISHED | Description: Reserved: not returned for a Wix site.
   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: 503 | Status Code: UNAVAILABLE | Application Code: BWT_SITE_BUSY | Description: Reserved: not returned for a Wix site.


```

### Examples

### Get Verification Token
```curl
curl -X GET \
'https://www.wixapis.com/bwt/v1/bing/verification-token' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.bwt.siteReadiness.getVerificationToken()
 Description: Retrieves the Bing verification meta tag of the site.  Wix places this tag on the site automatically when Verify Site runs, so the response is for display only. The tag is issued for the connected Bing account. It stays on the site after verification, because Bing rechecks it.
 Return type: PROMISE<GetVerificationTokenResponse>
  - name: metaTag | type: string | description: The complete `msvalidate.01` meta tag. For example, `<meta name="msvalidate.01" content="ABC123" />`.  | validation: maxLength 1000
  - name: token | type: string | description: The tag's `content` value alone.  | validation: maxLength 500

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: BWT_CONNECTION_EXPIRED | Description: Reserved: not returned for a Wix site.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: SITE_NOT_INDEXABLE | Description: Reserved: not returned for a Wix site.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: DOMAIN_NOT_CONNECTED | Description: Reserved: not returned for a Wix site.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: SITE_NOT_PUBLISHED | Description: Reserved: not returned for a Wix site.
   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: 503 | Status Code: UNAVAILABLE | Application Code: BWT_SITE_BUSY | Description: Reserved: not returned for a Wix site.


```

### Examples

### Get the site's Bing verification meta tag
```javascript
import { siteReadiness } from "@wix/bwt";

async function getVerificationToken() {
  const response = await siteReadiness.getVerificationToken();
}

/* Promise resolves to:
 * {
 *   "metaTag": "<meta name=\"msvalidate.01\" content=\"F3B2C1D0A9E8476F8B5C4D3E2F1A0B9C\" />",
 *   "token": "F3B2C1D0A9E8476F8B5C4D3E2F1A0B9C"
 * }
 */

```

### getVerificationToken (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 getVerificationToken() {
  const response = await myWixClient.siteReadiness.getVerificationToken();
};
```

---