User credential management API
The User Credential Management Rest API (version 2.0).
Download the OpenAPI definition (YAML)
Security schemes
BasicAuth: HTTP basic
OAuth2: oauth2
authorizationCode flow, token URL https://localhost:9443/oauth2/token, authorization URL https://localhost:9443/oauth2/authorize
3 scopes
| Scope | Description |
|---|---|
read | internal_user_credential_mgt_view |
delete | internal_user_credential_mgt_delete |
create | internal_user_credential_mgt_create |
Get User Credentials
Get all credentials for a user grouped by type
GET /{user-id}/credentials
Retrieves all user-enrolled credentials grouped by credential type. Requires administrative privileges with scope internal_user_credential_mgt_view. Supported credential types are passkey, push authentication, and backup codes.
Scope (Permission) required: internal_user_credential_mgt_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | string | Yes | The unique identifier of the user. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | CredentialsByType |
400 | Bad Request. | Error |
401 | Unauthorized. | Error |
403 | Forbidden. | Error |
404 | User Not Found. | Error |
500 | Internal Server Error. | Error |
Create User Credentials
Generate credentials of a specified type for a user.
POST /{user-id}/credentials/{type}
Generates credentials of the specified type for a user and returns the generated values. Calling this endpoint replaces any existing credentials of the same type. Requires administrative privileges with scope internal_user_credential_mgt_create.
Scope (Permission) required: internal_user_credential_mgt_create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | string | Yes | The unique identifier of the user. |
type | path | string | Yes | The type of the credential to generate. Allowed values: |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Credentials Created. | CredentialCreationResponse |
400 | Bad Request. | Error |
401 | Unauthorized. | Error |
403 | Forbidden. | Error |
404 | User Not Found. | Error |
500 | Internal Server Error. | Error |
Delete User Credentials
Delete all credentials of a specified type for a user.
DEL /{user-id}/credentials/{type}
Deletes all enrolled credentials of the specified type for a user. Only supported for backup-code. Requires administrative privileges with scope internal_user_credential_mgt_delete.
Scope (Permission) required: internal_user_credential_mgt_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | string | Yes | The unique identifier of the user. |
type | path | string | Yes | The type of the credentials to delete. Allowed values: |
Responses
| Code | Description | Schema |
|---|---|---|
204 | User Credentials Deleted. | |
400 | Bad Request. | Error |
401 | Unauthorized. | Error |
403 | Forbidden. | Error |
404 | User Not Found. | Error |
500 | Internal Server Error. | Error |
Delete User Credential
Delete a user-enrolled credential.
DEL /{user-id}/credentials/{type}/{credential-id}
Deletes a specific enrolled credential for a user. Requires administrative privileges with scope internal_user_credential_mgt_delete.
Scope (Permission) required: internal_user_credential_mgt_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | string | Yes | The unique identifier of the user. |
type | path | string | Yes | The type of the credential. Allowed values: |
credential-id | path | string | Yes | The unique identifier of the credential to delete. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | User Credential Deleted. | |
400 | Bad Request. | Error |
401 | Unauthorized. | Error |
403 | Forbidden. | Error |
404 | Credential not found. | Error |
500 | Internal Server Error. | Error |
Schemas
CredentialsByType
Type: object
User credentials grouped by type. passkey and push-auth contain lists of enrolled credentials; backup-code is a boolean indicating whether backup codes are enrolled.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
passkey | array of CredentialEntry | List of enrolled passkey credentials. | |
push-auth | array of CredentialEntry | List of enrolled push authentication credentials. | |
backup-code | boolean | Whether backup codes are currently enrolled for the user. |
CredentialEntry
Type: object
A single enrolled credential.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
credentialId | string | The unique identifier for the credential. | |
displayName | string | A user-friendly name for the credential. |
CredentialCreationResponse
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
type | string | The type of the created credential. | |
credentials | array of string | The generated credential values. |
Error
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | A unique, machine-readable error code following the WSO2 standard. | |
message | string | A human-readable summary of the error. | |
description | string | A more detailed explanation of the error. | |
traceId | string | The unique identifier for the request. |
Was this page helpful?