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

# Get GitHub Container Registry token

> Generates a temporary GitHub App installation token for ghcr.io access. Use this token with docker login: `docker login ghcr.io -u x-access-token -p <token>`. Token expires after approximately 1 hour.



## OpenAPI

````yaml get /integrations/github-container-registry/organization/{organizationId}/token
openapi: 3.0.0
info:
  title: Cybedefend API
  description: >-
    CybeDefend is an advanced API for application security analysis. Key
    features include OAuth 2.0 authentication, user/organization/project
    management, and REBAC-based permissions. It excels in static, dynamic, and
    IaC security analyses (SAST, DAST, IaC, etc.).
  version: '1.0'
  contact: {}
servers:
  - url: https://api-eu.cybedefend.com
    description: EU
  - url: https://api-us.cybedefend.com
    description: US
security: []
tags: []
paths:
  /integrations/github-container-registry/organization/{organizationId}/token:
    get:
      tags:
        - GitHub Container Registry
      summary: Get GitHub Container Registry token
      description: >-
        Generates a temporary GitHub App installation token for ghcr.io access.
        Use this token with docker login: `docker login ghcr.io -u
        x-access-token -p <token>`. Token expires after approximately 1 hour.
      operationId: GithubContainerRegistryOrganizationController_getRegistryToken
      parameters:
        - name: organizationId
          required: true
          in: path
          description: CybeDefend organization ID
          schema:
            format: uuid
            example: 550e8400-e29b-41d4-a716-446655440000
            type: string
      responses:
        '200':
          description: Registry token generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubRegistryTokenResponseDto'
        '401':
          description: Unauthorized - Invalid or missing authentication
          content:
            application/json:
              schema:
                example:
                  message: Unauthorized
                  statusCode: 401
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json:
              schema:
                example:
                  message: Forbidden
                  statusCode: 403
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
        '404':
          description: GitHub App not installed for organization
          content:
            application/json:
              schema:
                example:
                  message: Resource not found
                  statusCode: 404
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                example:
                  message: Internal server error
                  statusCode: 500
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
components:
  schemas:
    GithubRegistryTokenResponseDto:
      type: object
      properties:
        token:
          type: string
          description: GitHub App installation token (use as password for docker login)
          example: <github-app-token>
        username:
          type: string
          description: >-
            Username for docker login (always "x-access-token" for GitHub App
            tokens)
          example: x-access-token
        registryUrl:
          type: string
          description: Container registry URL
          example: ghcr.io
        githubOwner:
          type: string
          description: GitHub owner (user or organization)
          example: my-org
        expiresAt:
          type: string
          description: Token expiration (ISO 8601), typically ~1 hour
          example: '2025-01-16T15:30:00.000Z'
      required:
        - token
        - username
        - registryUrl
        - githubOwner
        - expiresAt

````