Skip to content

401 Client Error: Unauthorized for url: How to specify username/password for admin #28

@RAbraham

Description

@RAbraham

Hi,
I would like to access the admin api by providing the username and client. How do I specify that information? I tried the following for e.g. but it did not work.

headers = dict(grant_type='password', username='admin_user', password='testingxxx')
realm = KeycloakRealm(server_url=conf['keycloak_url'], realm_name='master', headers=headers)
users = realm.admin.realms.by_name('master').users
print(users.all())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions