Skip to content

admin_sdk/reports/quickstart.py HttpError 401 Access Denied #21

Description

@codyznash

I'm attempting to follow the quickstart for the Admin SDK.

After authentication I get the following output from the quickstart.py:

Authentication successful.
Getting the last 10 login events
Traceback (most recent call last):
File "quickstart.py", line 41, in
results = service.activities().list(userKey='all', applicationName='login',maxResults=10).execute()
File "..\Miniconda2\envs\default\lib\site-packages\googleapiclient_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "..\Miniconda2\envs\default\lib\site-packages\googleapiclient\http.py", line 842, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 401 when requesting https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/login?alt=json&maxResults=10 returned "Access denied. You are not authorized to read activity records.">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions