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

# Yêu cầu OTP

> Gửi yêu cầu lấy OTP (SMS/Email) phục vụ xác thực giao dịch. Chỉ sử dụng cho tài khoản có kiểu 2FA là SMS và Email.



## OpenAPI

````yaml /vi/openapi/ssi.2026-08-21.openapi.yaml post /api/v3/auth/requestOtp
openapi: 3.1.2
info:
  title: SSI FastConnect Open API
  version: 3.0.0
servers:
  - url: https://api.ssi.com.vn
    description: Production
security:
  - SsiBearerAuth: []
tags:
  - name: authentication
    description: Xác thực và quản lý token.
    x-group: Xác thực
  - name: account
    description: Thông tin tài khoản giao dịch.
    x-group: Tài khoản
  - name: market-data
    description: Dữ liệu thị trường.
    x-group: Dữ liệu thị trường
  - name: trading
    description: Giao dịch và quản lý lệnh.
    x-group: Giao dịch
  - name: conditional-orders
    description: Lệnh điều kiện.
    x-group: Lệnh điều kiện
paths:
  /api/v3/auth/requestOtp:
    post:
      tags:
        - authentication
      summary: Yêu cầu OTP
      description: >-
        Gửi yêu cầu lấy OTP (SMS/Email) phục vụ xác thực giao dịch. Chỉ sử dụng
        cho tài khoản có kiểu 2FA là SMS và Email.
      operationId: requestOtp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - apiKey
                - apiSecret
              properties:
                apiKey:
                  type: string
                  description: API key do SSI/FastConnect cấp.
                apiSecret:
                  type: string
                  description: API secret tương ứng với apiKey.
      responses:
        '200':
          description: Thành công.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OtpResponse'
              example:
                message: Thành công
                transactionId: f306c510-0647-417b-9210-bb5b7e155e77
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
      security: []
components:
  schemas:
    OtpResponse:
      type: object
      required:
        - message
        - transactionId
      properties:
        message:
          type: string
          description: Thông báo kết quả xử lý yêu cầu OTP.
          example: Thành công
        transactionId:
          type: string
          description: >-
            Mã transaction trả về khi tài khoản dùng 2FA loại SmartOTP. 

            Dùng mã này để gọi `auth/token` sau khi đã phê duyệt trên ứng dụng
            iBoard. 

            **⚠️ Lưu ý: `transactionId` chỉ có hiệu lực trong vòng 30 giây — bạn
            cần thực hiện

            phê duyệt giao dịch này trên ứng dụng iBoard App Mobile trong thời
            gian đó. 

            Sau khi đã phê duyệt trên mobile, cần sử dụng `transactionId` 

            để gọi API `auth/token` để lấy token có quyền đặt lệnh.**
          example: f306c510-0647-417b-9210-bb5b7e155e77
    ErrorResponse:
      type: object
      properties:
        code:
          description: Mã kết quả hoặc mã xác thực giao dịch.
          type: string
        msg:
          description: Thông báo kết quả xử lý.
          type: string
  responses:
    BadRequest:
      description: Yêu cầu không hợp lệ.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Chưa được xác thực hoặc token không hợp lệ.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Lỗi nội bộ máy chủ.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    SsiBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Access token lấy từ endpoint /api/v3/auth/token hoặc
        /api/v3/auth/refresh.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.