title: KeyError: 'access_token'?
body: <p>When i try to run this code</p>
  
  <pre><code>from oauth2client.service_account import ServiceAccountCredentials
  import requests, gspread
  import os
  import ast
  
  def authenticate_google_docs():
      f = open(os.path.join('Checkin.p12'), 'rb')
      SIGNED_KEY = f.read()
      f.close()
      scope = ['https://spreadsheets.google.com/feeds', 'https://docs.google.com/feeds']
      credentials = ServiceAccountCredentials('danylo.lian@gmail.com', SIGNED_KEY, scope)
  
      data = {
          'refresh_token' : '&lt;refresh-token-copied&gt;',
          'client_id' : '&lt;client-id-copied&gt;',
          'client_secret' : '&lt;client-secret-copied&gt;',
          'grant_type' : 'refresh_token',
      }
  
      r = requests.post('https://accounts.google.com/o/oauth2/token', data = data)
      credentials.access_token = ast.literal_eval(r.text)['access_token']
  
      gc = gspread.authorize(credentials)
      return gc
  
  gc = authenticate_google_docs()
  
  sh = gc.open_by_url('https://docs.google.com/spreadsheets/d/11WR6rwQhL4wUDN8I77ju_5rzZl8IglsUjtUDI6pZsAQ/edit#gid=0')
  </code></pre>
  
  <p>I got an error</p>
  
  <blockquote>
    <p>credentials.access_token = ast.literal_eval(r.text)['access_token']
    KeyError: 'access_token'</p>
  </blockquote>
  
  <p>What does it means and what must i do?</p>