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.

Backup codes API

Download OpenAPI (YAML)Version v1

Base URL: https://api.asgardeo.io/t/<ORGANIZATION_NAME>/api/users/v1

The WSO2 Identity Platform - Backup Code API Definition (version v1).

Download the OpenAPI definition (YAML)

Security schemes​

OAuth2: oauth2

You can use the following OAuth grant type to securely access the respective API endpoints.

Authorization Code OAuth Flow

Authorization URL: 'https://api.asgardeo.io/t/{org-name}/oauth2/authorize'

This flow type is used for the me endpoint of backup-codes APIs. You can use the following scope for this endpoints.

  • internal_login: Grant permission for an authenticated user for self management.

me​

Operations for the authenticated user.

Retrieve remaining backup codes count​

GET /me/backup-codes

This API is used to retrieve the count of remaining backup codes of the authenticated user.

Scope required:internal_login

Responses

CodeDescriptionSchema
200

OK

RemainingBackupCodeResponse
401

Unauthorized

500

Server Error

Error

Generate backup codes​

POST /me/backup-codes

This API is used to generate backup codes.

Scope required:internal_login

Responses

CodeDescriptionSchema
201

Created

BackupCodeResponse
401

Unauthorized

500

Server Error

Error

Delete backup codes​

DEL /me/backup-codes

This API is used to delete backup codes of the authenticated user.

Scope required:internal_login

Responses

CodeDescriptionSchema
204

Backup codes deleted successfully.

401

Unauthorized

500

Server Error

Error

Schemas​

Error​

Type: object

Backup code error.

4 properties
NameTypeRequiredDescription
codestringYes

Error code.

messagestringYes

Error message.

descriptionstring

Error description.

traceIdstringYes

Error trace id.

BackupCodeResponse​

Type: object

Backup code response.

1 property
NameTypeRequiredDescription
backupCodesarray of string

Backup codes of the authenticated user.

RemainingBackupCodeResponse​

Type: object

Remaining backup code response.

1 property
NameTypeRequiredDescription
remainingBackupCodesCountinteger

Remaining backup codes of the authenticated user.

Was this page helpful?