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

# Get Secret Value

> Return a single secret value as plain text.

Called by ``LookupSecret`` inside the sandbox. Checks custom secrets
first, then falls back to provider tokens — always resolving the
latest token at call time.



## OpenAPI

````yaml /openapi/openhands-cloud.json get /api/v1/sandboxes/{sandbox_id}/settings/secrets/{secret_name}
openapi: 3.1.0
info:
  title: OpenHands
  description: 'OpenHands: Code Less, Make More'
  version: 0.0.1
servers: []
security: []
paths:
  /api/v1/sandboxes/{sandbox_id}/settings/secrets/{secret_name}:
    get:
      tags:
        - Sandbox
      summary: Get Secret Value
      description: |-
        Return a single secret value as plain text.

        Called by ``LookupSecret`` inside the sandbox. Checks custom secrets
        first, then falls back to provider tokens — always resolving the
        latest token at call time.
      operationId: >-
        get_secret_value_api_v1_sandboxes__sandbox_id__settings_secrets__secret_name__get
      parameters:
        - name: secret_name
          in: path
          required: true
          schema:
            type: string
            title: Secret Name
        - name: sandbox_id
          in: path
          required: true
          schema:
            type: string
            title: Sandbox Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Access-Token

````