gmail.users.history.list
GET {{baseUrl}}/gmail/v1/users/:userId/history?historyTypes=<string>&historyTypes=<string>&labelId=<string>&maxResults=<integer>&pageToken=<string>&startHistoryId=<string>&$.xgafv=<string>&access_token=<string>&alt=<string>&callback=<string>&fields=<string>&key=<string>&oauth_token=<string>&prettyPrint=<boolean>"aUser=<string>&upload_protocol=<string>&uploadType=<string>
Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId
).
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
historyTypes | string | History types to be returned by the function | |
historyTypes | string | History types to be returned by the function | |
labelId | string | Only return messages with a label matching the ID. | |
maxResults | string | The maximum number of history records to return. | |
pageToken | string | Page token to retrieve a specific page of results in the list. | |
startHistoryId | string | Required. Returns history records after the specified startHistoryId . The supplied startHistoryId should be obtained from the historyId of a message, thread, or previous list response. History IDs increase chronologically but are not contiguous with random gaps in between valid IDs. Supplying an invalid or out of date startHistoryId typically returns an HTTP 404 error code. A historyId is typically valid for at least a week, but in some rare circumstances may be valid for only a few hours. If you receive an HTTP 404 error response, your application should perform a full sync. If you receive no nextPageToken in the response, there are no updates to retrieve and you can store the returned historyId for a future request. | |
$.xgafv | string | V1 error format. | |
access_token | string | OAuth access token. | |
alt | string | Data format for response. | |
callback | string | JSONP | |
fields | string | Selector specifying which fields to include in a partial response. | |
key | string | API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. | |
oauth_token | string | OAuth 2.0 token for the current user. | |
prettyPrint | string | Returns response with indentations and line breaks. | |
quotaUser | string | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. | |
upload_protocol | string | Upload protocol for media (e.g. "raw", "multipart"). | |
uploadType | string | Legacy upload protocol for media (e.g. "media", "multipart"). |
RESPONSES
status: OK
{"history":[{"id":"ex commodo consectetur","labelsAdded":[{"labelIds":["tempor mollit Duis minim nostrud","eu"],"message":{"historyId":"dolor","id":"ex exercitation ad irure","internalDate":"in in","labelIds":["Lorem in est ea","voluptate sed ex officia"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"non en","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"non aute proident","partId":"sint","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"cupidatat repr","sizeEstimate":-13786389,"snippet":"fugiat sit","threadId":"sunt ipsum nisi do"}},{"labelIds":["laborum ea","in sunt et"],"message":{"historyId":"eu Ut","id":"fugiat magna cillum proident","internalDate":"ut","labelIds":["exercitation veniam aute","velit consectetur sint anim"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"aliquip amet","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"ea minim et aliquip","partId":"consequat","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"elit occaecat sint","sizeEstimate":-17310421,"snippet":"tempor nostrud","threadId":"consectetur offi"}}],"labelsRemoved":[{"labelIds":["ut dolor sunt","tempor dolor dolore amet"],"message":{"historyId":"aute p","id":"in nostrud veniam","internalDate":"labore Duis commodo","labelIds":["sed eu ea","cupidatat irure"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"aliqua ex adipisicing","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"cil","partId":"ex laboris quis adipisicing","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"esse do pariatur elit","sizeEstimate":-58692221,"snippet":"exercitation fugiat esse velit","threadId":"aute eiusmod elit"}},{"labelIds":["nostrud incididun","mollit sunt"],"message":{"historyId":"incididunt in tempor","id":"enim officia veniam","internalDate":"sint Lorem","labelIds":["elit","et eiusmod"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"exercitation nisi","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"Duis Lorem","partId":"id voluptate","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"culpa Ut cillum","sizeEstimate":99482464,"snippet":"dolore","threadId":"in culpa sint nulla"}}],"messages":[{"historyId":"incididunt ex non","id":"ad eiusmod in officia","internalDate":"in","labelIds":["non ipsum reprehenderit","ipsum"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"laborum consequat velit","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"irure sint cupidatat consectetu","partId":"cupidatat laboris","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"dolor voluptate velit tempor esse","sizeEstimate":-60102028,"snippet":"aliquip dolor pariatur sunt","threadId":"sit culpa"},{"historyId":"dolor consectetur anim","id":"Lorem quis deserunt nostrud","internalDate":"non","labelIds":["reprehenderit elit","pariatur incididunt cillum officia in"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"sit magna minim aute","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"laborum in pariatur culpa","partId":"officia exercitation minim","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"veniam","sizeEstimate":-48871797,"snippet":"est cillum","threadId":"nisi "}],"messagesAdded":[{"message":{"historyId":"dolore culpa do qui","id":"et ullamco exercitation","internalDate":"laborum ad magna","labelIds":["est","voluptate minim aute"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"in magna ex enim","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"ipsum Excepteur","partId":"anim consectetur culpa sed amet","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"sint voluptate do","sizeEstimate":-43602756,"snippet":"pariatur elit qui commodo","threadId":"minim volu"}},{"message":{"historyId":"veniam dolore laborum","id":"laborum o","internalDate":"non adipisicing","labelIds":["dolore","mollit officia elit"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"nostrud minim Excepteur mollit labore","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"velit veniam enim non dolore","partId":"ullamco","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"deserunt proident anim n","sizeEstimate":-54996027,"snippet":"eu elit","threadId":"esse voluptate eiusmod fugiat tempor"}}],"messagesDeleted":[{"message":{"historyId":"consequat ad dolor","id":"officia","internalDate":"ipsum pariatur","labelIds":["fugiat in reprehenderit adipisicing veniam","proident laborum aute"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"est aliqua nostrud enim","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"deserunt elit irure","partId":"nisi anim amet","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"dolor quis nulla qui","sizeEstimate":-27107525,"snippet":"in tempor","threadId":"deserunt laboris Lorem laborum"}},{"message":{"historyId":"amet commodo","id":"ut officia nulla nisi","internalDate":"exercitation amet consectetur dolore officia","labelIds":["ut","ex consec"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"eu cillum labore commodo aliqua","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"nulla","partId":"nulla dolore proident","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"magna veniam","sizeEstimate":-42797998,"snippet":"sed aliquip labore","threadId":"voluptate esse veniam amet"}}]},{"id":"aliqua ut magna irure","labelsAdded":[{"labelIds":["ipsum et aliqua commodo in","cupidatat dolor elit laboris"],"message":{"historyId":"sit Lorem reprehenderit","id":"ipsum ex","internalDate":"occaecat laboris","labelIds":["dolore mollit dolor nisi","aute ut"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"esse incididunt officia","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"consectetur ipsum laboris in fugiat","partId":"non mollit nulla","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"non incididunt est commodo","sizeEstimate":-51914449,"snippet":"dolor id","threadId":"adipisicing et est incididunt"}},{"labelIds":["mollit labore aliqua sint","velit do nostrud eu"],"message":{"historyId":"labore elit reprehenderit in","id":"enim ut cillum consequat","internalDate":"incididunt amet","labelIds":["in","eiusmod deserunt"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"et minim","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"exercitation adipisicing irure","partId":"in in ut elit","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"aute veniam eu qui","sizeEstimate":-30717551,"snippet":"proide","threadId":"aute ullamco qui"}}],"labelsRemoved":[{"labelIds":["aliquip dolor in l","cupidatat et Ut"],"message":{"historyId":"amet tempor sint elit exercitation","id":"minim aliqua","internalDate":"velit id labore enim","labelIds":["non laboris minim","Lorem elit nostrud sit"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"fugiat dolore officia aliqua nulla","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"ut minim","partId":"in","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"f","sizeEstimate":-59181788,"snippet":"dolore mollit cillum ","threadId":"aut"}},{"labelIds":["nostrud ea","Ut consequat incididunt exercitation"],"message":{"historyId":"ex elit ullamco","id":"Excepteur veniam ad est","internalDate":"proident cupidatat exercitation","labelIds":["ut","eiusmod incididunt reprehenderit"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"amet qui","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"dolore nostrud","partId":"tempor velit pariatur eu","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"sit Excepteur aute ea","sizeEstimate":1012223,"snippet":"ut veniam","threadId":"paria"}}],"messages":[{"historyId":"incididunt Excepteur veniam","id":"anim magna dolore ad","internalDate":"cillum","labelIds":["dolore ut","proident Lorem laborum culpa"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"reprehenderit sunt esse","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"dolore ipsum aliquip","partId":"deserunt Excepteur ut laborum elit","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"culpa sint ullamco ad irure","sizeEstimate":-17946315,"snippet":"reprehenderit amet","threadId":"commodo ull"},{"historyId":"dol","id":"qui do nisi","internalDate":"irure laborum cupidatat","labelIds":["elit esse","aliqua velit id deserunt"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"dolore","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"veniam ","partId":"pariatur tempor enim Lorem nulla","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"qui fugiat do","sizeEstimate":42609667,"snippet":"commodo","threadId":"ad"}],"messagesAdded":[{"message":{"historyId":"nostrud culpa","id":"amet sed quis dolor","internalDate":"dolor non","labelIds":["qui consequat","cillum voluptate sed"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"reprehenderit velit","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"pariatur ullamco","partId":"veniam","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"cillum Duis irure in","sizeEstimate":66482949,"snippet":"ut","threadId":"commo"}},{"message":{"historyId":"voluptate laboris ut consequat","id":"aliquip mollit nisi","internalDate":"ipsum dolor tempor reprehenderit","labelIds":["officia aute","laboris non do Ut"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"consectetur enim et eiusmod","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"veniam ut ad ","partId":"occaecat","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"ad et dolor","sizeEstimate":-56984387,"snippet":"ipsum qui aute","threadId":"Duis dolor occaecat cillum"}}],"messagesDeleted":[{"message":{"historyId":"enim officia","id":"Lorem","internalDate":"eu ullamco ni","labelIds":["nulla commodo consequat in laborum","dolor magna eiu"],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"dolore exercitation","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"dolore est exercitation Excepteur velit","partId":"Lorem dolore officia Duis","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"nisi labore dolore","sizeEstimate":-82020126,"snippet":"exercitat","threadId":"ipsum"}},{"message":{"historyId":"deserunt","id":"in ex","internalDate":"amet velit Excepteur officia","labelIds":["et ad anim occaecat in","dolor "],"payload":{"body":{"attachmentId":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"data":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"size":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"filename":"laborum aute","headers":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"mimeType":"in eu","partId":"dolor consectetur in","parts":[{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/MessagePart detected\u003e"}]},"raw":"est aliquip","sizeEstimate":-77048438,"snippet":"veniam pariatur id","threadId":"ut ipsum sunt cillum dolor"}}]}],"historyId":"do irure qui anim sit","nextPageToken":"incididunt quis ut"}