AuthenticationSetup 2FA
Authentication

Setup 2FA

Returns a QR code URI for TOTP enrolment.

curl -X POST "https://api.neostra.io/api/v1/auth/2fa/setup" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)"
{
  "success": true,
  "message": "example_string",
  "data": {
    "qrCodeUrl": "example_string",
    "secret": "example_string"
  }
}
POST
/api/v1/auth/2fa/setup
POST
Bearer Token (JWT)
Bearer Tokenstring
Required

Bearer token (JWT) - just enter the token, "Bearer" prefix will be added automatically

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). Authentication token required.

Responses

successboolean
messagestring
dataobject