I am Developing an application which uses Login to Gmail.I gone through all tutorials,stackoverflow questions which is tagged under OAuth 2.0 and documents that
For an alternative way of accessing the Gmail API with an OAuth2 token, you may consider the answers from this post: OAuth and Java (connecting to GMail).