v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-137956179.1 KB
users

Lists the messages in the user's mailbox. For more information, see List Gmail messages.

get/gmail/v1/users/{userId}/messages

Path parameters

userIdstring required

The user's email address. The special value me can be used to indicate the authenticated user.

Query parameters

includeSpamTrashboolean

Include messages from SPAM and TRASH in the results.

labelIdsstring[]

Only return messages with labels that match all of the specified label IDs. Messages in a thread might have labels that other messages in the same thread don't have. To learn more, see Manage labels on messages and threads.

maxResultsinteger

Maximum number of messages to return. This field defaults to 100. The maximum allowed value for this field is 500.

pageTokenstring

Page token to retrieve a specific page of results in the list.

qstring

Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread". Parameter cannot be used when accessing the api using the gmail.metadata scope.

Response

Successful response