/gmail/v1/users/{userId}/messages
GET
/gmail/v1/users/{userId}/messages
users
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://gmail.googleapis.com//gmail/v1/users//messages'
Response Response Example
{
"messages": [
{
"historyId": "string",
"id": "string",
"internalDate": "string",
"labelIds": [
"string"
],
"payload": {
"body": {
"attachmentId": "string",
"data": "string",
"size": 0
},
"filename": "string",
"headers": [
{
"name": "string",
"value": "string"
}
],
"mimeType": "string",
"partId": "string",
"parts": [
{}
]
},
"raw": "string",
"sizeEstimate": 0,
"snippet": "string",
"threadId": "string"
}
],
"nextPageToken": "string",
"resultSizeEstimate": 0
}
Request
Path Params
userId
stringÂ
required
me
can be used to indicate the authenticated user.Query Params
includeSpamTrash
stringÂ
optional
SPAM
and TRASH
in the results.labelIds
array[string]
optional
maxResults
integerÂ
optional
pageToken
stringÂ
optional
q
stringÂ
optional
"from:someuser@example.com rfc822msgid: is:unread"
. Parameter cannot be used when accessing the api using the gmail.metadata scope.Responses
Modified at 2023-08-15 05:40:23