Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding the ID of a gmail message

Tags:

gmail-api

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!

like image 300
Morgan Allen Avatar asked Dec 26 '15 18:12

Morgan Allen


1 Answers

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)

like image 120
MahdeTo Avatar answered Jan 04 '23 00:01

MahdeTo