How can i read emails in a gmail account?

76 views
Skip to first unread message

Anu Raj

unread,
Oct 25, 2014, 5:23:59 AM10/25/14
to adwor...@googlegroups.com
I have created created a javascript class where I am requesting for login and after login I am getting some response with access_token with some other parameters. I want to get all the emails which are there in the account where I am requesting for the access_token. Please help me is the way which I am trying to get connect to gmail account is right, or I need to do some changes. If I am wrong please guide me the proper way to do, because I am very new with integration so please do help me how can I connect and get all the emails which are there in the gmail account to which I am trying to connect. 

My code for Login to gmail

<script type="text/javascript">
  (function() {
   var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
   po.src = 'https://apis.google.com/js/client:plusone.js';
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
 })();
</script>



  <script type="text/javascript">
      (function() {
           var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
           po.src = 'https://apis.google.com/js/client:plusone.js';
           var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
     })();

     var AuthStates = {google: null};

     function signinCallback(authResult) {
          if (authResult['status']['signed_in']) {                  
            document.getElementById('signinButton').setAttribute('style', 'display: none');
            console.log('code state: ' + authResult['code']);                
            AuthStates.google = authResult;
            console.log('authResult 1 : ' + authResult['status']['method']);
            console.log('auth Result : ' + authResult['id_token']);                
            connection(authResult['access_token'], authResult['code']);
          } else {                
            console.log('Sign-in state: ' + authResult['error']);
          }
        }

  </script>

Michael Cloonan (AdWords API Team)

unread,
Oct 27, 2014, 1:30:47 PM10/27/14
to adwor...@googlegroups.com
Hello,

This forum is for support with the AdWords API only. Since your question is about accessing GMail, we will not be able to assist you.

Regards,
Mike, AdWords API Team
Reply all
Reply to author
Forward
0 new messages