# Admin Directory API . verificationCodes

## Instance Methods

Generate new backup verification codes for the user.

Invalidate the current backup verification codes for the user.

Returns the current set of valid backup verification codes for the specified user.

### Method Details

`generate(userKey)`

    Generate new backup verification codes for the user.

    Args:
      userKey: string, Email or immutable ID of the user (required)

`invalidate(userKey)`

    Invalidate the current backup verification codes for the user.

    Args:
      userKey: string, Email or immutable ID of the user (required)

`list(userKey)`

    Returns the current set of valid backup verification codes for the specified user.

    Args:
      userKey: string, Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. (required)

    Returns:
      An object of the form:

        { # JSON response template for List verification codes operation in Directory API.
        "etag": "A String", # ETag of the resource.
        "items": [ # A list of verification code resources.
          { # JSON template for verification codes in Directory API.
            "etag": "A String", # ETag of the resource.
            "kind": "admin#directory#verificationCode", # The type of the resource. This is always admin#directory#verificationCode.
            "userId": "A String", # The obfuscated unique ID of the user.
            "verificationCode": "A String", # A current verification code for the user. Invalidated or used verification codes are not returned as part of the result.
          },
        ],
        "kind": "admin#directory#verificationCodesList", # The type of the resource. This is always admin#directory#verificationCodesList.
      }