AuthN | Python SDK | User Endpoints
User Endpoints
Get User (client token)
authn.client.userinfo(code)Retrieve the logged in user's token and information.
response = authn.client.userinfo(
code="pmc_d6chl6qulpn3it34oerwm3cqwsjd6dxw",
)
Change a user's password
authn.client.password.change(token, old_password, new_password)Change a user's password given the current password.
authn.client.password.change(
token="ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
old_password="hunter2",
new_password="My2n+Password",
)
Create User
authn.user.create(email, profile, username)Create a user.
response = authn.user.create(
email="joe.user@email.com",
profile={
"first_name": "Joe",
"last_name": "User",
}
)
Delete User
authn.user.delete(email, id, username)Delete a user.
authn.user.delete(email="example@example.com")
List Users
authn.user.list(filter, last, order, order_by, size)Look up users by scopes.
response = authn.user.list()
Update user's settings
authn.user.update(disabled, unlock, id, email, username)Update user's settings.
response = authn.user.update(
email="joe.user@email.com",
disabled=True,
)
Get user
authn.user.profile.get(id, email, username)Get user's information by identity or email.
response = authn.user.profile.get(
email="joe.user@email.com",
)
Update user
authn.user.profile.update(profile, id, email, username)Update user's information by identity or email.
response = authn.user.profile.update(
profile={
"phone": "18085550173",
},
email: "joe.user@email.com",
)
Delete user authenticator
authn.user.authenticators.delete(authenticator_id, id, email, username)Delete a user's authenticator.
authn.user.authenticators.delete(
authenticator_id="pau_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
id="pui_xpkhwpnz2cmegsws737xbsqnmnuwtbm5",
)
Get user authenticators
authn.user.authenticators.list(email, id, username)Get user's authenticators by identity or email.
response = authn.user.authenticators.list(
id="pui_xpkhwpnz2cmegsws737xbsqnmnuwtbm5",
)