gmail.users.settings.updateAutoForwarding
Updates the auto-forwarding setting for a Gmail account, letting you enable forwarding, choose a disposition, and set the verified forwarding address. Use it to change where incoming mail is sent.
Instructions
Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled. For more information, see Manage email forwarding. This method is only available to service account clients that have been delegated domain-wide authority [HTTP PUT] — updates the resource; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON AutoForwarding object accepting disposition, emailAddress, enabled; pass it via params or whole via body_file Siblings over the same resource: getAutoForwarding, getImap, getLanguage, getPop, getVacation, updateImap, updateLanguage, updatePop, updateVacation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Extra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe. | |
| params | No | Parameter map merged into the request; typed parameters win. | |
| userId | Yes | [URL path segment] User's email address. The special value "me" can be used to indicate the authenticated user. | me |
| dry_run | No | Return the request that would be sent, without sending it. | |
| body_file | No | Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON AutoForwarding object. | |
| request_body | No | Request body of type AutoForwarding: pass it via `params` (merged into the built body) or whole via `body_file`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enabled | No | ||
| disposition | No | ||
| emailAddress | No |