---
title: "POST /v3/{+name}:getVerificationCode"
method: POST
path: "/v3/{+name}:getVerificationCode"
tags: ["projects"]
---

# POST /v3/{+name}:getVerificationCode

`POST /v3/{+name}:getVerificationCode`

Requests a verification code for an already verified channel that can then be used in a call to VerifyNotificationChannel() on a different channel with an equivalent identity in the same or in a different project. This makes it possible to copy a channel between projects without requiring manual reverification of the channel. If the channel is not in the verified state, this method will fail (in other words, this may only be used if the SendNotificationChannelVerificationCode and VerifyNotificationChannel paths have already been used to put the given channel into the verified state).There is no guarantee that the verification codes returned by this method will be of a similar structure or form as the ones that are delivered to the channel via SendNotificationChannelVerificationCode; while VerifyNotificationChannel() will recognize both the codes delivered via SendNotificationChannelVerificationCode() and returned from GetNotificationChannelVerificationCode(), it is typically the case that the verification codes delivered via SendNotificationChannelVerificationCode() will be shorter and also have a shorter expiration (e.g. codes such as "G-123456") whereas GetVerificationCode() will typically return a much longer, websafe base 64 encoded string that has a longer expiration time.

## Path parameters

- `name` string, required

## Request body

- GetNotificationChannelVerificationCodeRequest — The GetNotificationChannelVerificationCode request.
  - `expireTime` string, google-datetime — The desired expiration time. If specified, the API will guarantee that the returned code will not be valid after the specified timestamp; however, the API cannot guarantee that the returned code will be valid for at least as long as the requested time (the API puts an upper bound on the amount of time for which a code may be valid). If omitted, a default expiration will be used, which may be less than the max permissible expiration (so specifying an expiration may extend the code's lifetime over omitting an expiration, even though the API does impose an upper limit on the maximum expiration that is permitted).

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/monitoring.md) · [All operations](https://skmtc.net/google/apis/monitoring/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/monitoring/versions/11ce0f8d9e4c/schema)
