# WebResource: getToken

**Requires [authorization](https://developers.google.com/site-verification/v1/webResource/getToken#auth)**

Gets a verification token for the authenticated user to place on a website or domain.
[Try it now](https://developers.google.com/site-verification/v1/webResource/getToken#try-it).

## Request

### HTTP request

```
POST https://www.googleapis.com/siteVerification/v1/token
```

### Authorization

This request requires authorization with at least one of the following scopes ([read more about authentication and authorization](https://developers.google.com/site-verification/v1/getting_started#auth)).

| Scope |
|---|
| `https://www.googleapis.com/auth/siteverification` |
| `https://www.googleapis.com/auth/siteverification.verify_only` |

### Request body

In the request body, supply data with the following structure:

```
{
  "site": {
    "type": string,
    "identifier": string
  },
  "verificationMethod": string
}
```

| Property name | Value | Description | Notes |
|---|---|---|---|
| `site` | `object` | Container for the address and type of a site for which a verification token will be generated. |   |
| `site.type` | `string` | The type of resource to be verified. <br /> Acceptable values are: - "`ANDROID_APP`" - "`INET_DOMAIN`" - "`SITE`" |   |
| `site.identifier` | `string` | The site identifier. If the type is set to `SITE`, the identifier is a URL. If the type is set to `INET_DOMAIN`, the identifier is a domain name. |   |
| `verificationMethod` | `string` | The verification method for the Site Verification system to use to verify this site or domain. <br /> Acceptable values are: - "`ANALYTICS`": Sites only - "`DNS`": Use DNS_TXT instead - "`DNS_CNAME`": Domains only - "`DNS_TXT`": Domains only - "`FILE`": Sites only - "`META`": Sites only - "`TAG_MANAGER`": Sites only |   |

## Response

If successful, this method returns a response body with the following structure:

```
{
  "method": string,
  "token": string
}
```

| Property name | Value | Description | Notes |
|---|---|---|---|
| `method` | `string` | The verification method that you selected in the request. <br /> Acceptable values are: - "`ANALYTICS`" - "`DNS`" - "`DNS_CNAME`" - "`DNS_TXT`" - "`FILE`" - "`META`" - "`TAG_MANAGER`" |   |
| `token` | `string` | The string to place on the authenticated user's site, using the selected verification method. For more information, see [Verification methods and tokens](https://developers.google.com/site-verification/v1/getting_started#tokens) in the Getting Started document. |   |

## Try it!


Use the APIs Explorer below to call this method on live data and see the response.
Alternatively, try the
[standalone
Explorer](https://developers.google.com/apis-explorer/#p/siteVerification/v1/siteVerification.webResource.getToken).