4
votes

I'm currently playing around with the Gmail API.

https://developers.google.com/gmail/api/v1/reference/users/messages/get

Does anyone know how to find the email ID?

Thanks!

2
And just to test things quickly, if you open a particular email in gmail web app, it will show message id in urlpratsJ

2 Answers

6
votes

You need to do a list as described here first (it has search semantics in the q parameter if you are not interested in all messages): https://developers.google.com/gmail/api/v1/reference/users/messages/list

This returns a list of messages which look like this: https://developers.google.com/gmail/api/v1/reference/users/messages#resource

The message id is the id field ("id": string)

0
votes

To find message id you need to open message, press "..." -> Show original. There will be message ID. But it's in weird format what Gmail API does not understand.