Skip to content

Confirm two-factor setup

POST
/profile/2fa/confirm
curl --request POST \
--url https://api.proxyrequest.com/api/v1/profile/2fa/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "code": "492031" }'

Verifies a six-digit TOTP code generated from the pending secret and enables two-factor authentication for the account.

object
code
required
string
>= 6 characters <= 8 characters
Examples
ExampleConfirmTOTP

Confirm TOTP

{
"code": "492031"
}

The operation completed successfully.

Media typeapplication/json
object
enabled
required
boolean
Examples
ExampleTwo-factorEnabled

Two-factor enabled

{
"enabled": true
}

The request is malformed or violates a business rule.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
translation

Stable translation key suitable for client localisation.

string
key
additional properties
One of:
string
Examples
ExampleValidationError

Validation error

{
"non_field_errors": [
"The request could not be processed."
],
"translation": "errors.request.invalid"
}

Authentication credentials are missing, expired, or invalid.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
translation

Stable translation key suitable for client localisation.

string
key
additional properties
One of:
string
Examples
ExampleAuthenticationRequired

Authentication required

{
"detail": "Authentication credentials were not provided."
}

The authenticated account cannot perform this operation.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
translation

Stable translation key suitable for client localisation.

string
key
additional properties
One of:
string
Examples
ExamplePermissionDenied

Permission denied

{
"detail": "You do not have permission to perform this action."
}