i am trying to implement a task by which to access GMail through the Google API (Java client). The scope of the task is that it will retrieve a user's emails, labels etc. It's my first time interacting with the Google Cloud Platform and i am trying to read through the documentation. Up to now i have fully understood about the "OAuth 2.0 for Server to Server Applications" and i have created a new service account. I am trying to use the tutorials from Google but the classes mentioned in these are deprecated.
My question is, is there any up to date documentation or code example online? Can anyone please provide any pointers on this?
Best regards and thank you so much in advance.