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

# List user repositories from GitHub or GitLab

> Retrieves repositories for the authenticated user. Returns a structured response with github and gitlab properties, containing repositories for each provider (or null if not connected/fetched).



## OpenAPI

````yaml get /users/me/repos
openapi: 3.0.0
info:
  title: OST API
  description: OST API endpoints
  version: '0.1'
  contact: {}
servers:
  - url: https://api.opensource-together.com
    description: Backend server
security: []
tags:
  - name: ost
    description: ''
paths:
  /users/me/repos:
    get:
      tags:
        - User
      summary: List user repositories from GitHub or GitLab
      description: >-
        Retrieves repositories for the authenticated user. Returns a structured
        response with github and gitlab properties, containing repositories for
        each provider (or null if not connected/fetched).
      operationId: UserController_listRepos
      parameters:
        - name: provider
          required: false
          in: query
          description: >-
            Git provider (github or gitlab). If specified, only fetches from
            that provider. If not provided, fetches from all connected providers
            in parallel.
          schema:
            enum:
              - github
              - gitlab
            type: string
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            type: number
        - name: per_page
          required: false
          in: query
          description: Number of repositories per page (max 100)
          schema:
            type: number
      responses:
        '200':
          description: Repositories retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/RepositoriesResponseSchema'
                  timestamp:
                    type: string
                    format: date-time
                    example: '2025-09-03T13:04:43.353Z'
                required:
                  - data
                  - timestamp
        '400':
          description: Invalid provider or not connected
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      details:
                        type: object
                  timestamp:
                    type: string
                    format: date-time
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      details:
                        type: object
                  timestamp:
                    type: string
                    format: date-time
components:
  schemas:
    RepositoriesResponseSchema:
      type: object
      properties:
        github:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/RepositoryPaginateSchema'
        gitlab:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/RepositoryPaginateSchema'
      required:
        - github
        - gitlab
    RepositoryPaginateSchema:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RepositoryDataSchema'
        pagination:
          $ref: '#/components/schemas/RepositoryPaginationSchema'
      required:
        - data
        - pagination
    RepositoryDataSchema:
      type: object
      properties:
        name:
          type: string
        description:
          type: object
          nullable: true
        url:
          type: string
        html_url:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
        pushed_at:
          type: string
        stargazers_count:
          type: number
        forks_count:
          type: number
        open_issues_count:
          type: number
      required:
        - name
        - description
        - url
        - html_url
        - created_at
        - updated_at
        - pushed_at
        - stargazers_count
        - forks_count
        - open_issues_count
    RepositoryPaginationSchema:
      type: object
      properties:
        next:
          type: number
          nullable: true
        last:
          type: number
          nullable: true
      required:
        - next
        - last

````