title: How to Google-Authentication OAuth2 into an account with given login-data?
body: <p>My aim is it to write a php script that query all events from an existing google calendar of one specific google account.</p>
  <p>The default scripts to do this works fine.
  At the moment it works so: Request my php script --&gt; it recognizes that is has no <code>$_GET['code']</code> parameter --&gt; redirect the browser to google for login --&gt; after login google redirects back to my php script --&gt; and the query on the calendar can be done</p>
  <p>But what i want to do now: is that my php script performs the login into this specific google account with the <code>username</code> and <code>password</code>. I have and my script shell retrieve the <code>$_GET['code']</code> parameter without any user interaction.</p>
  <p>I have already spent lots of hours researching and testing but i have not found any solution yet.</p>
  <p>Is that even possible? If it is there a way to pass these login datails (username and password) within the request to google authendication to the two-step login form?</p>
  <p>In this thread is an hint to use service-accounts: <a href="https://stackoverflow.com/questions/34130068/fatal-error-class-google-auth-assertioncredentials-not-found">Fatal error: Class 'Google_Auth_AssertionCredentials' not found</a>
  but i have not figured out how to do this.</p>
  <p>Thanks in advance.</p>