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