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

# Get grant code details

> Retrieve details of a specific grant code.



## OpenAPI

````yaml /api/grant-codes/openapi.yaml get /grant-codes/get
openapi: 3.1.0
info:
  title: Unified CDN API | Grant codes
  description: Interact with grant codes in the Unified CDN system.
  version: 0.1.0
servers:
  - url: https://{Unified_CDN_domain}/api
    description: Production server where your Unified CDN is hosted.
    variables:
      Unified_CDN_domain:
        default: api.example.com
        description: >-
          The domain where your Unified CDN is hosted. Change this to your
          custom domain if you have one.
security: []
paths:
  /grant-codes/get:
    get:
      summary: Get grant code details
      description: Retrieve details of a specific grant code.
      responses:
        '200':
          description: Grant code details retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Code'
        '401':
          description: Unauthorized access due to missing or invalid grant code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missingCode:
                  summary: Missing code
                  value:
                    error: UnauthorisedError
                    message: Missing code in Authorization header.
                invalidCode:
                  summary: Invalid code
                  value:
                    error: UnauthorisedError
                    message: The grant code is invalid or has expired.
      security:
        - CodeAuth: []
components:
  schemas:
    Code:
      type: object
      properties:
        code:
          description: The grant code.
          type: string
        action:
          description: Action the code is restricted to.
          type: string
        data:
          description: Additional data passed when generating the code.
          type: object
        applicationId:
          description: ID of the application that this code is for.
          type: string
        apiKeyId:
          description: ID of the API key that generated and owns this code.
          type: string
        expiresAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
      required:
        - code
        - action
        - data
        - applicationId
        - apiKeyId
        - expiresAt
        - createdAt
    Error:
      type: object
      required:
        - code
        - message
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    CodeAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Enter your code using the format `Code <your-code>`.

````

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