- [HTTP request](https://developers.google.com/my-business/reference/verifications/rest/v1/verificationTokens/generate.md.txt#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/my-business/reference/verifications/rest/v1/verificationTokens/generate.md.txt#body.request_body)
  - [JSON representation](https://developers.google.com/my-business/reference/verifications/rest/v1/verificationTokens/generate.md.txt#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/my-business/reference/verifications/rest/v1/verificationTokens/generate.md.txt#body.response_body)
  - [JSON representation](https://developers.google.com/my-business/reference/verifications/rest/v1/verificationTokens/generate.md.txt#body.GenerateInstantVerificationTokenResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/my-business/reference/verifications/rest/v1/verificationTokens/generate.md.txt#body.aspect)
- [Result](https://developers.google.com/my-business/reference/verifications/rest/v1/verificationTokens/generate.md.txt#Result)

Generate a token for the provided location data to verify the location.

### HTTP request

`POST https://mybusinessverifications.googleapis.com/v1/verificationTokens:generate`

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

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "locationId": string // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| The location info to generate an instant verification token for. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `locationId` | `string` The location identifier associated with an unverified listing. This is the location id generated at the time that the listing was originally created. It is the final portion of a location resource name as generated by the Business Information API. Note: the caller must be an owner or manager of this listing in order to generate a verification token. See the [location resource](https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations.md.txt) documentation for more information. |
| End of mutually exclusive fields. ||

### Response body

Response message for Verifications.GenerateInstantVerificationToken.

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

| JSON representation |
|---|
| ``` { "result": enum (`Result`), "instantVerificationToken": string } ``` |

| Fields ||
|---|---|
| `result` | ``enum (`Result`)`` Output only. The result of the instant verification token generation. |
| `instantVerificationToken` | `string` The generated instant verification token. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/business.manage`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).

## Result

| Enums ||
|---|---|
| `RESULT_UNSPECIFIED` | Default value, will result in errors. |
| `SUCCEEDED` | The instant verification token was generated successfully. |
| `FAILED` | The instant verification token was not generated.. |