> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arqonara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable 2FA

> Enable TOTP two-factor authentication.

Mengaktifkan 2FA menggunakan kode dari aplikasi authenticator.

Mengaktifkan fitur 2FA pada akun setelah QR Code di-scan.

### Langkah-langkah

1. Panggil endpoint [Get 2FA QR Code](/api-reference/account/get-2fa).
2. User scan QR Code.
3. User memasukkan kode 6-digit dari aplikasi authenticator.
4. Kirim kode tersebut ke endpoint ini untuk memverifikasi dan mengaktifkan 2FA.

<Warning>
  **Penting:** Simpan `recovery_tokens` yang dikembalikan oleh endpoint ini. Token tersebut adalah satu-satunya cara memulihkan akun jika user kehilangan perangkat authenticatornya.
</Warning>


## OpenAPI

````yaml POST /account/two-factor
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

````