Users.settings: getAutoForwarding

Requires authorization

Gets the auto-forwarding setting for the specified account. Try it now.

Request

HTTP request

GET https://www.googleapis.com/gmail/v1/users/userId/settings/autoForwarding

Parameters

Parameter name Value Description
Path parameters
userId string User's email address. The special value "me" can be used to indicate the authenticated user.

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.readonly
https://www.googleapis.com/auth/gmail.settings.basic

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{
  "enabled": boolean,
  "emailAddress": string,
  "disposition": string
}
Property name Value Description Notes
emailAddress string Email address to which all incoming messages are forwarded. This email address must be a verified member of the forwarding addresses.
disposition string The state that a message should be left in after it has been forwarded.

Acceptable values are:
  • "archive": Archive the message.
  • "dispositionUnspecified": Unspecified disposition.
  • "leaveInInbox": Leave the message in the INBOX.
  • "markRead": Leave the message in the INBOX and mark it as read.
  • "trash": Move the message to the TRASH.
enabled boolean Whether all incoming mail is automatically forwarded to another address.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Enviar comentarios sobre…

¿Necesitas ayuda? Visita nuestra página de asistencia.