I am 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 above code, I am trying to create a function and return the access token to the context in my admin template.
But. I get this error, I donβt know what to do with it:
('Unexpected credentials type', None, 'Expected', 'service_account')
What could be the problem?
source share