Enable 2FA

On this page

Enable 2FA using a code from an authenticator app.

Enable the 2FA feature on the account after the QR Code has been scanned.

Steps#

  1. Call the Get 2FA QR Code endpoint.
  2. The user scans the QR Code.
  3. The user enters the 6-digit code from the authenticator app.
  4. Send that code to this endpoint to verify and enable 2FA.

Caution

**Important:** Save the `recovery_tokens` returned by this endpoint. These tokens are the only way to recover the account if the user loses their authenticator device.

OpenAPI#

yaml

openapi: 3.0.0
info:
  title: Arqonara Global API
  version: 1.0.0
  description: Dokumentasi API lengkap untuk Client Arqonara (Account & Server Management).
servers:
  - url: https://panel.arqonara.com/api/client
    description: Client API
security:
  - bearerAuth: []
paths:
  /account/two-factor:
    post:
      tags:
        - Authentication
      summary: Enable 2FA
      description: |-
        Enable TOTP two-factor authentication.
        Mengaktifkan 2FA menggunakan kode dari aplikasi authenticator.
      operationId: enable-2fa
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
              required:
                - code
      responses:
        '200':
          description: Recovery Tokens
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT