title: Oauth2 - get access token, server to access Google-Cloud-platform
body: <p>The Oauth2 documentation for google doesnt contain (that I have seen yet)
  Information on what I am trying to do.</p>
  
  <p>From my server I want to post request to my google cloud to get a response. </p>
  
  <p>For this I need an access token, currently i'm taking it manually from the playground. I am going from my server to my cloud and the documentation states about a user accepting access and then being redirected etc but I don't involve any users.</p>
  
  <ul>
  <li>I need to continuously, automatically get an access token for my requests, or similar. Without needing to click for access?</li>
  </ul>
  
  <p>this is the request, for context: </p>
  
  <pre><code>var options = {
          method: 'POST',
          uri: 'https://dialogflow.googleapis.com/v2beta1/projects/someproject/agent/sessions/1:detectIntent',
          headers: {
              'Authorization': 'Bearer ya29.GlsGBscelmqeHgOVgx1p4EF_L45zetym6s3isC1HF4IYJqb20vHd8FolxvsmM_vU2fmIPWN3JElGIEuNN3i_-N9V-68YlwNvEduMIA5SuSltK-Sepsl0yNYM9REy',
              'Content-Type': 'application/json'
          },
          body: {
              "queryInput": {
                  "event": {
                      "name": "Matching",
                      "languageCode": "en"
                  }
              }
          },
          json: true // Automatically stringifies the body to JSON
      };
  </code></pre>
  
  <p>For more information, I am triggering an intent from dialogflow.</p>