Backup codes API
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
| Code | Description | Schema |
|---|---|---|
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
| Code | Description | Schema |
|---|---|---|
201 | Created | BackupCodeResponse |
401 | Unauthorized | |
500 | Server Error | Error |
Schemas
Error
Type: object
Backup code error.
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Error code. |
message | string | Yes | Error message. |
description | string | Error description. | |
traceId | string | Yes | Error trace id. |
BackupCodeResponse
Type: object
Backup code response.
1 property
| Name | Type | Required | Description |
|---|---|---|---|
backupCodes | array of string | Backup codes of the authenticated user. |
RemainingBackupCodeResponse
Type: object
Remaining backup code response.
1 property
| Name | Type | Required | Description |
|---|---|---|---|
remainingBackupCodesCount | integer | Remaining backup codes of the authenticated user. |
Was this page helpful?