Google Workspace Gmail Logs

Hello,

I am trying to fetch email transaction logs for the Gmail application from Google Workspace.

As per the documentation here, the application name is mentioned as "gmail" for retrieving its logs. However, I am unable to fetch Gmail logs.

I am using a Python script that successfully retrieves logs for other applications like login, drive, etc. But when I use "gmail" as the application name, I encounter the following error:

Error fetching activity logs: Parameter "applicationName" value "gmail" does not match the pattern "(access_transparency)|(admin)|(calendar)|(chat)|(chrome)|(context_aware_access)|(data_studio)|(drive)|(gcp)|(gplus)|(groups)|(groups_enterprise)|(jamboard)|(keep)|(login)|(meet)|(mobile)|(rules)|(saml)|(token)|(user_accounts)|(vault)"

What is the correct application name to use for fetching Gmail logs?

0 3 338
3 REPLIES 3

Are you maybe looking for https://developers.google.com/admin-sdk/reports/v1/appendix/activity/admin-gmail-settings (See the "Email log search" section of that page)?

Hope that helps,

Ian

Ian,

I'm looking to fetch gmail logs via API, are there any specific scope or api endpoint to collect gmail logs?

Thanks ,

Vishnu P

Yesโ€”details are on the page I linked to, including sample API requests.

Top Labels in this Space