Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
agafonoo opened this issue Oct 30, 2023 · 0 comments

Comments

@agafonoo
Copy link

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

@agafonoo agafonoo changed the title Getting "Received 429 Too Many Requests" for auth logs even hitting the API in 6-7 minute intervals Getting "Received 429 Too Many Requests" for auth logs even if hitting the API in 6-7 minute intervals Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant