I have successfully managed to connect to GMAIL API using Powershell. However, I'm having difficulties finding where to get the message body.
According to GMAIL's Documentation: https://developers.google.com/gmail/api/v1/reference/users/messages/get
It should be right here under the Payload attribute: GET https://www.googleapis.com/gmail/v1/users/userId/messages/id
This is what I run:
Invoke-WebRequest -Uri "https://www.googleapis.com/gmail/v1/users/me/messages/$($id)?access_token=$accesstoken&format=full" -Method Get | ConvertFrom-Json | select -ExpandProperty payload
Here's a sample of what I get back:
Looking through the attributes I dont seem to find anything remotely close to the message body. What am I missing?