title: How to call Dialogflow Rest API with OAuth access token
body: <p>I have created project in google console
  Enable the Dialogflow API
  Created OAuth v2 credential
  Using this credentials i called access token api to generate token</p>
  <pre><code>https://accounts.google.com/o/oauth2/v2/auth?
   scope=https://www.googleapis.com/auth/dialogflow&amp;
   access_type=offline&amp;
   include_granted_scopes=true&amp;
   response_type=code&amp;
   state=state_parameter_passthrough_value&amp;
   redirect_uri=http://localhost&amp;
   client_id= **i placed client id here**
  </code></pre>
  <p>I received access token and passed it to Dialog flow API</p>
  <pre><code>https://dialogflow.googleapis.com/v2/projects/**PROJECT-ID**/agent/sessions/123456:detectIntent
  Header
  Content-Type : application/json; charset=utf-8
  Authorization : Bearer **ACCESS_TOKEN**
  
  Body
  {
    &quot;query_input&quot;: {
      &quot;text&quot;: {
        &quot;text&quot;: &quot;I know french&quot;,
        &quot;language_code&quot;: &quot;en-US&quot;
      }
    }
  }
  </code></pre>
  <p>Still i am getting this error</p>
  <p>&quot;error&quot;:{&quot;code&quot;: 401, &quot;message&quot;: &quot;Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See <a href="https://developers.google.com/identity/sign-in/web/devconsole-project.%22,%E2%80%A6%7D" rel="nofollow noreferrer">https://developers.google.com/identity/sign-in/web/devconsole-project.&quot;,…}</a></p>
  <p>i am not able to identify where i went wrong</p>
  <p>Please help thanks in advance</p>