I am using a service account and domain wide delegation to access all email accounts under client's domain with read-only scope https://www.googleapis.com/auth/gmail.readonly In the message get request I use format option "metadata" with fields='payload/headers' which returns only email headers but not the content of the message.
Is there a way to restrict my app access to metadata only and not the content of the emails? This would ensure that my application can not read sensitive email content information and have access to metadata only.
Thanks!