Method: verificationCodes.list
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
指定したユーザーの現在の有効なバックアップ確認コードのセットを返します。
HTTP リクエスト
GET https://admin.googleapis.com/admin/directory/v1/users/{userKey}/verificationCodes
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
userKey |
string
API リクエストでユーザーを識別します。この値は、ユーザーのメインのメールアドレス、エイリアス メールアドレス、一意のユーザー ID のいずれかです。
|
リクエストの本文
リクエストの本文は空にする必要があります。
レスポンスの本文
Directory API のリスト確認コード オペレーションの JSON レスポンス テンプレート。
成功した場合、レスポンスの本文には次の構造のデータが含まれます。
JSON 表現 |
{
"kind": string,
"etag": string,
"items": [
{
object (VerificationCode )
}
]
} |
フィールド |
kind |
string
リソースのタイプ。これは常に admin#directory#verificationCodesList です。
|
etag |
string
リソースの ETag。
|
items[] |
object (VerificationCode )
確認コードのリソースのリスト。
|
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/admin.directory.user.security
詳しくは、認可ガイドをご覧ください。
VerificationCode
Directory API を使用すると、ユーザーのバックアップ確認コードを表示、生成、無効にできます。
JSON 表現 |
{
"userId": string,
"verificationCode": string,
"kind": string,
"etag": string
} |
フィールド |
userId |
string
ユーザーの難読化された一意の ID。
|
verificationCode |
string
ユーザーの現在の確認コード。無効になった確認コードや使用済みの確認コードは、結果の一部として返されません。
|
kind |
string
リソースのタイプ。これは常に admin#directory#verificationCode です。
|
etag |
string
リソースの ETag。
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# Method: verificationCodes.list\n\nReturns the current set of valid backup verification codes for the specified user.\n\n### HTTP request\n\n`GET https://admin.googleapis.com/admin/directory/v1/users/{userKey}/verificationCodes`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| `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. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nJSON response template for list verification codes operation in Directory API.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"etag\": string, \"items\": [ { object (/workspace/admin/directory/reference/rest/v1/verificationCodes/list#VerificationCode) } ] } ``` |\n\n| Fields ||\n|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` The type of the resource. This is always `admin#directory#verificationCodesList`. |\n| `etag` | `string` ETag of the resource. |\n| `items[]` | `object (`[VerificationCode](/workspace/admin/directory/reference/rest/v1/verificationCodes/list#VerificationCode)`)` A list of verification code resources. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/admin.directory.user.security`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nVerificationCode\n----------------\n\nThe Directory API allows you to view, generate, and invalidate backup verification codes for a user.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------|\n| ``` { \"userId\": string, \"verificationCode\": string, \"kind\": string, \"etag\": string } ``` |\n\n| Fields ||\n|--------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| `userId` | `string` The obfuscated unique ID of the user. |\n| `verificationCode` | `string` A current verification code for the user. Invalidated or used verification codes are not returned as part of the result. |\n| `kind` | `string` The type of the resource. This is always `admin#directory#verificationCode`. |\n| `etag` | `string` ETag of the resource. |"]]