title: Google Oaut2 - Python using requests whiout Library
body: <p>I am trying to authenticate not google by means of requests if I use the api but I don't know what I put in the &quot;code&quot; field and it will work, you can help me, or the code follows below.</p>
  <pre><code>import requests
  
  url = &quot;https://accounts.google.com/o/oauth2/token&quot;
  
  payload='grant_type=authorization_code&amp;client_secret=xxxxx&amp;client_id=xxxx&amp;redirect_uri=https%3A%2F%2Fpushsistemas.com.br%2F&amp;code='
  headers = {
    'content-type': 'application/x-www-form-urlencoded',
    'Cookie': 'NID=219=RgUebbUM4k3WX0uQr8HVcIZkQ5-rMrb4HHnfnRzNTxUse776sG6-LItgXwpdv-MmaFYf3Tu4otJN-UfP70OzDtdnfam2dwAZkd6yMsr8BW_7lGE4FTaas9QkoG-hOMqXgYEHvI4YK39dWgXhWnL0E5LcsOv0DXnfjJ2kUf7VlTs; __Host-GAPS=1:jGXTa0ipDEC58oJF7pZwNBVeSXCQRw:3IRHy3GC9mAq4nqt'
  }
  
  response = requests.request(&quot;POST&quot;, url, headers=headers, data=payload)
  
  </code></pre>
  <p>This output</p>
  <pre><code>{
      &quot;error&quot;: &quot;invalid_request&quot;,
      &quot;error_description&quot;: &quot;Missing required parameter: code&quot;
  }
  
  </code></pre>
  <p>if it is not possible to do this way could you send me how to do it using the google library?</p>