I can not figure out how to tell the Gmail API to not return the Gmail Message "snippet" field.
I am making my users.messages GET request with the following parameters:
const getOptions: gmail_v1.Params$Resource$Users$Messages$Get = {
userId: 'me',
access_token: user.gmailAccessToken, // access token with the https://www.googleapis.com/auth/gmail.modify scope
format: GmailMessageFormat.METADATA, // no need to get full message, just get necessary metadata for each message
metadataHeaders: ['From', 'Message-ID', 'To'],
id: messageId
};
As one can see I am only requesting GmailMessageFormat.METADATA as the format and even then only asking for three fields, yet still, in the response bodies, I am getting the "snippet" attribute fully populated with, "a short part of the message text", which I consider highly sensitive and do not want.
Is there any way to not get this sensitive field in the response body while still getting select headers like "to", "from" and "message-id"?
As one can see I am actually using the nodejs sdk, not the rest api, but ultimately they are the same thing. Here is the nodejs users.messages.get documentation in case anyone is curious.
Thanks for the assistance!

