Gmail API . users . settings . forwardingAddresses

Instance Methods

create(userId=*, body=None)

Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted.

delete(userId=*, forwardingEmail=*)

Deletes the specified forwarding address and revokes any verification that may have been required.

get(userId=*, forwardingEmail=*)

Gets the specified forwarding address.

list(userId=*)

Lists the forwarding addresses for the specified account.

Method Details

create(userId=*, body=None)
Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted.

This method is only available to service account clients that have been delegated domain-wide authority.

Args:
  userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required)
  body: object, The request body.
    The object takes the form of:

{ # Settings for a forwarding address.
    "forwardingEmail": "A String", # An email address to which messages can be forwarded.
    "verificationStatus": "A String", # Indicates whether this address has been verified and is usable for forwarding. Read-only.
  }


Returns:
  An object of the form:

    { # Settings for a forwarding address.
      "forwardingEmail": "A String", # An email address to which messages can be forwarded.
      "verificationStatus": "A String", # Indicates whether this address has been verified and is usable for forwarding. Read-only.
    }
delete(userId=*, forwardingEmail=*)
Deletes the specified forwarding address and revokes any verification that may have been required.

This method is only available to service account clients that have been delegated domain-wide authority.

Args:
  userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required)
  forwardingEmail: string, The forwarding address to be deleted. (required)
get(userId=*, forwardingEmail=*)
Gets the specified forwarding address.

Args:
  userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required)
  forwardingEmail: string, The forwarding address to be retrieved. (required)

Returns:
  An object of the form:

    { # Settings for a forwarding address.
      "forwardingEmail": "A String", # An email address to which messages can be forwarded.
      "verificationStatus": "A String", # Indicates whether this address has been verified and is usable for forwarding. Read-only.
    }
list(userId=*)
Lists the forwarding addresses for the specified account.

Args:
  userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required)

Returns:
  An object of the form:

    { # Response for the ListForwardingAddresses method.
    "forwardingAddresses": [ # List of addresses that may be used for forwarding.
      { # Settings for a forwarding address.
          "forwardingEmail": "A String", # An email address to which messages can be forwarded.
          "verificationStatus": "A String", # Indicates whether this address has been verified and is usable for forwarding. Read-only.
        },
    ],
  }