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

# Generate SDK Liveness Token

> Allows users to create a liveness token for SDK operations.



## OpenAPI

````yaml /api-reference/specs/sdk.json post /v2/api/identity/sdk/liveness/token
openapi: 3.0.3
info:
  title: Youverify SDK Utilities API
  version: 2.0.0
  description: >-
    Server-side helper endpoints used by Youverify's mobile/web Liveness SDKs:
    configuring liveness behavior, minting SDK session tokens, and reviewing
    liveness-check history. Assembled from
    doc.youverify.co/api-reference-sdk/sdk, kept in the exact order they appear
    in the GitBook navigation (SDK Settings → Generate SDK Liveness Token →
    Generate SDK Session ID → Liveness History). 401/429/500 are account-wide
    errors sourced verbatim from Youverify's "Youverify OS Error Codes" page and
    attached to every operation; 402 is attached to POST operations; any error a
    specific page actually showed (e.g. the 404 on SDK Settings and Liveness
    History) is kept exactly as documented there.
  contact:
    name: Youverify Support
    email: support@youverify.co
servers:
  - url: https://api.youverify.co
    description: Production (live, billed)
  - url: https://api.sandbox.youverify.co
    description: Sandbox (test data, not billed)
security:
  - ApiKeyAuth: []
tags:
  - name: SDK Utilities
    description: Server-side helper endpoints used by the mobile/web SDKs.
paths:
  /v2/api/identity/sdk/liveness/token:
    post:
      tags:
        - SDK Utilities
      summary: Generate SDK Liveness Token
      description: Allows users to create a liveness token for SDK operations.
      operationId: generateSdkLivenessToken
      parameters:
        - name: token
          in: header
          required: true
          schema:
            type: string
          description: API secret token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                publicMerchantID:
                  type: string
                  description: Public merchant ID
                deviceCorrelationId:
                  type: string
                  description: Device correlation ID
                deviceId:
                  type: string
                  description: Device ID used to derive deviceCorrelationId
              required:
                - publicMerchantID
            example:
              publicMerchantID: 92hfbw9ub299929b
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                success: true
                statusCode: 200
                message: Liveness token fetched successfully!
                data:
                  authToken: eyJhbGciOi...
                  sessionId: b15a8d20-c602-...
                links: []
        '401':
          $ref: '#/components/responses/Error401Unauthorized'
        '402':
          $ref: '#/components/responses/Error402PaymentRequired'
        '429':
          $ref: '#/components/responses/Error429TooManyRequests'
        '500':
          $ref: '#/components/responses/Error500ServerError'
components:
  responses:
    Error401Unauthorized:
      description: Unauthorized — the token header is missing or invalid.
      content:
        application/json:
          example:
            success: false
            statusCode: 401
            message: Permission denied
            name: UnauthorizedError
            data: {}
    Error402PaymentRequired:
      description: Payment Required — your account balance is too low to run this check.
      content:
        application/json:
          example:
            success: false
            statusCode: 402
            message: Insufficient fund
            name: PaymentRequiredError
            data: {}
    Error429TooManyRequests:
      description: Too Many Requests — you have exceeded the rate limit; wait and retry.
      content:
        application/json:
          example:
            success: false
            statusCode: 429
            message: Too many requests
            name: RateLimitError
            data: {}
    Error500ServerError:
      description: >-
        Internal Server Error — a rare, unexpected failure on Youverify's side.
        Contact support@youverify.co if it persists.
      content:
        application/json:
          example:
            success: false
            statusCode: 500
            message: Internal Server Error
            name: Error
            data: {}
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: token
      description: Your Youverify API secret key. Never expose client-side.

````