Method: users.settings.delegates.create
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
確認メールを送信せずに、確認ステータスを accepted
に直接設定した委任先を追加します。委任先のユーザーは、委任元のユーザーと同じ Google Workspace 組織のメンバーである必要があります。
Gmail では、Google Workspace 組織内の各ユーザーが設定できる代理人と委任者の数に制限があります。これらの上限は組織によって異なりますが、一般に各ユーザーは最大 25 人の委任者と最大 10 人の委任者を指定できます。
なお、委任ユーザーは、メール エイリアスではなくメインのメールアドレスで参照する必要があります。
また、新しい委任先を作成してから、新しい委任先を使用できるようになるまでに最大 1 分かかることがあります。
この方法は、ドメイン全体の権限が委任されたサービス アカウント クライアントでのみ使用できます。
HTTP リクエスト
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/delegates
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
userId |
string
ユーザーのメールアドレス。特別な値「me」を使用して、認証済みユーザーを指定できます。
|
リクエストの本文
リクエストの本文には Delegate
のインスタンスが含まれます。
レスポンスの本文
成功した場合、レスポンスの本文には、新しく作成された Delegate
のインスタンスが含まれます。
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/gmail.settings.sharing
詳しくは、認可ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# Method: users.settings.delegates.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nAdds a delegate with its verification status set directly to `accepted`, without sending any verification email. The delegate user must be a member of the same Google Workspace organization as the delegator user.\n\nGmail imposes limitations on the number of delegates and delegators each user in a Google Workspace organization can have. These limits depend on your organization, but in general each user can have up to 25 delegates and up to 10 delegators.\n\nNote that a delegate user must be referred to by their primary email address, and not an email alias.\n\nAlso note that when a new delegate is created, there may be up to a one minute delay before the new delegate is available for use.\n\nThis method is only available to service account clients that have been delegated domain-wide authority.\n\n### HTTP request\n\n`POST https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/delegates`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------|\n| `userId` | `string` User's email address. The special value \"me\" can be used to indicate the authenticated user. |\n\n### Request body\n\nThe request body contains an instance of [Delegate](/workspace/gmail/api/reference/rest/v1/users.settings.delegates#Delegate).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Delegate](/workspace/gmail/api/reference/rest/v1/users.settings.delegates#Delegate).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/gmail.settings.sharing`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]