title: ('Unexpected credentials type', None, 'Expected', 'service_account') with oauth2client (Python)
body: <p>I'm trying to get Google Analytics data with this guide: <a href="https://ga-dev-tools.appspot.com/embed-api/server-side-authorization/" rel="noreferrer">https://ga-dev-tools.appspot.com/embed-api/server-side-authorization/</a></p>
  
  <pre><code>def get_access_token(request):
      return {'access_t': ServiceAccountCredentials.from_json_keyfile_name(
          KEY_FILEPATH, SCOPE).get_access_token().access_token }
  </code></pre>
  
  <p>With the code above I'm trying to a create a function and return the access token to the context in my admin template. </p>
  
  <p>However. I get this error I don't know what to do with:</p>
  
  <pre><code>('Unexpected credentials type', None, 'Expected', 'service_account')
  </code></pre>
  
  <p>What could be the issue here?</p>