Skip to content

Getting "Received 429 Too Many Requests" for auth logs even if hitting the API in 6-7 minute intervals #240

Description

@agafonoo

Description

I am using the Duo client to get auth logs in roughly 6-7 minute intervals. The project is in development and once deployed that interval will be measured in hours.

Expected Behavior

Using

admin_api.get_authentication_log(api_version=2, kwargs=params, users=user_ids)

I would expect to get the logs back.

Actual Behavior

Screenshot from 2023-10-30 10-12-56

I get the "429" error instead.

Screenshot from 2023-10-30 10-25-12

Steps to Reproduce

You can try to reproduce with this chunk of code:

def get_duo_user_ids(admin_api, usernames):
    user_ids = []

    try:
        user_info = admin_api.get_users_by_names(usernames)
        for user in user_info:
            user_ids.append(user["user_id"])
    except (NameError, TypeError) as error: 
        print(error)

    return user_ids

def get_authentication_duo_log(self, admin_api, user_ids):
    params = {}
    params["limit"] = 1000

    try:
        auth_logs = admin_api.get_authentication_log(api_version=2, kwargs=params, users=user_ids)
    except (NameError, TypeError) as error: 
        print(error)
    return auth_logs

I have the latest version of the client installed.

Screenshot from 2023-10-30 10-30-59

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions