- [HTTP request](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getVerificationToken#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getVerificationToken#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getVerificationToken#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getVerificationToken#body.request_body)
- [Response body](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getVerificationToken#body.response_body)
  - [JSON representation](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getVerificationToken#body.DomainVerificationToken.SCHEMA_REPRESENTATION)
- [Try it!](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getVerificationToken#try-it)

Gets a verification token used for verifying a user's ownership over a domain.

### HTTP request

`GET https://gmailpostmastertools.googleapis.com/v2/{name=domains/*/verificationToken}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the verification token to retrieve. Format: `domains/{domain}/verificationToken` |

### Query parameters

| Parameters ||
|---|---|
| `verificationMethod` | ``enum (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/DomainVerificationMethod`)`` Required. The verification method used. Must be specified, i.e. TXT or CNAME. |

### Request body

The request body must be empty.

### Response body

The DNS token a user can use to verify ownership of a domain.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "name": string, "token": string, "verificationMethod": enum (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/DomainVerificationMethod`) } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The resource name of the domain verification token. Format: domains/{domain}/verificationToken |
| `token` | `string` The verification token. |
| `verificationMethod` | ``enum (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/DomainVerificationMethod`)`` The verification method used. |