Skip to main content
Cloud has the newest features. Some may not be in a release yet; the newest release is Identity & Access Management 7.3.0.

User credential management API

Download OpenAPI (YAML)Version 2.0

Base URL: https://localhost:9443/t/carbon.super/o/api/users/v2

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
ScopeDescription
readinternal_user_credential_mgt_view
deleteinternal_user_credential_mgt_delete
createinternal_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

NameInTypeRequiredDescription
user-idpathstringYes

The unique identifier of the user.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
user-idpathstringYes

The unique identifier of the user.

typepathstringYes

The type of the credential to generate.

Allowed values: backup-code

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
user-idpathstringYes

The unique identifier of the user.

typepathstringYes

The type of the credentials to delete.

Allowed values: backup-code

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
user-idpathstringYes

The unique identifier of the user.

typepathstringYes

The type of the credential.

Allowed values: passkey, push-auth

credential-idpathstringYes

The unique identifier of the credential to delete.

Responses

CodeDescriptionSchema
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
NameTypeRequiredDescription
passkeyarray of CredentialEntry

List of enrolled passkey credentials.

push-autharray of CredentialEntry

List of enrolled push authentication credentials.

backup-codeboolean

Whether backup codes are currently enrolled for the user.

CredentialEntry​

Type: object

A single enrolled credential.

2 properties
NameTypeRequiredDescription
credentialIdstring

The unique identifier for the credential.

displayNamestring

A user-friendly name for the credential.

CredentialCreationResponse​

Type: object

2 properties
NameTypeRequiredDescription
typestring

The type of the created credential.

credentialsarray of string

The generated credential values.

Error​

Type: object

4 properties
NameTypeRequiredDescription
codestring

A unique, machine-readable error code following the WSO2 standard.

messagestring

A human-readable summary of the error.

descriptionstring

A more detailed explanation of the error.

traceIdstring

The unique identifier for the request.

Was this page helpful?