Users & Profile
Turn on the two-factor authentication flag
POST
Access: Bearer token required.
Sets twoFactorEnabled to true on the account. No request body is read. This is only a stored preference today: no secret or code is generated or verified, and none of the sign-in endpoints check the flag, so signing in is unchanged. Idempotent.
bearerAuthheader
AuthorizationBearer <JWT>Access token returned by sign-in. Send it as Authorization: Bearer <token>.
Flag set
application/json- response
status*integersuccess*booleanmessage*stringdata*curl -X POST 'http://localhost:4000/api/v1/user/enable-2fa'Example Response
{ "status": 200, "success": true, "message": "Two-factor authentication enabled.", "data": { "twoFactorEnabled": true }}
HomeLink Hub