title: In my meteor app, how do I make authenticated google API calls on behalf of my user?
body: <p><strong>Background</strong>: This is my first standalone web development project, and my only experience in Meteor is building the Discover Meteor app over the last summer. I come from about a year of CS experience as a side interest in school, and I am most comfortable with C and C++. I have experience in python and java.</p>
  
  <p><strong>Project so far</strong>: I'm creating a calendar management system (for fun). Using accounts-google, I have created user accounts that are authenticated through google. I have requested the necessary permissions that I need for my app, including 'identity' and 'calendar read/write access'. I've spent the last week or so trying to get over this next hurdle, which is actually getting data from google.</p>
  
  <p><strong>Goal</strong>: I'd like to be able to make an API call to <a href="https://developers.google.com/google-apps/calendar/v3/reference/calendarList/list" rel="nofollow noreferrer">Calendar.list</a> using a GET request. I've already called <code>meteor add http</code> to add the GET request functionality, my issue comes with the actual implementation. </p>
  
  <p><strong>Problem</strong>: I have registered my app on the developer console and set up Accounts using the client ID and secret, but I have not been able to find/generate my 'API key' for use in the request. <a href="https://developers.google.com/accounts/docs/OAuth2ServiceAccount#authorizingrequests" rel="nofollow noreferrer">Here</a> is the google guide for creating the access token by using my (already) downloaded private key. I'm having a hard time wrapping my head around an implementation on the server side using JS because I don't have a lot of experience with what is mentioned in the HTTP/REST portion of the implementation examples. I would appreciate some help on how to implement a handshake and receive an access token for use in my app. If there is a call I can make or some package that will handle the token generation for me, that would be even better than implementation help. I believe an answer to this would also benefit <a href="https://stackoverflow.com/questions/25982118/how-to-use-google-contacts-api-in-meteor">this other question</a></p>
  
  <p>The SO answer that I've been referring to so far: <a href="https://stackoverflow.com/a/14543159/4259653">https://stackoverflow.com/a/14543159/4259653</a> Some of it is in spanish but it's pretty understandable code. He has an API key for his request, which I asked this question to help me with. The <code>accounts-google</code> documentation isn't really enough to explain this all to me.</p>
  
  <p>Also an unrelated small question: What is the easiest way to deal with 'time' parameters in requests. I'm assuming JS has some sort of built-in functionality that I'm just not aware of yet. </p>