Client A P I
Enable two-factor authentication
Enables two-factor authentication for the authenticated user and returns one-time recovery tokens.
POST
/api/client/account/two-factorAuthorization
default AuthorizationBearer <token>
Application API requests require an application API token, or a client API token, that belongs to a root administrator. Admin API requests require a client API token that belongs to a root administrator, and reject application API tokens. Client API requests require a client API token.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/client/account/two-factor" \ -H "Content-Type: application/json" \ -d '{ "code": "123456", "password": "current-password" }'{ "object": "recovery_tokens", "attributes": { "tokens": [ "r1a2b3c4d5" ] }}