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

# Create a Telegram pairing token

> Generates a unique 48-char connect token for the given Telegram integration. The user sends this token to the bot via /start <token> to pair their Telegram chat.



## OpenAPI

````yaml /api-reference/openapi.json post /api/integrations/{id}/telegram/pairing
openapi: 3.0.0
info:
  title: Open Attack Surface Management
  description: Open-source platform for cybersecurity Attack Surface Management (ASM)
  version: '1.0'
  contact: {}
servers:
  - url: https://{baseUrl}/api/v1
    variables:
      baseUrl:
        default: localhost:3000
        description: API server hostname with port (e.g. localhost:3000, api.example.com)
security: []
tags: []
externalDocs:
  description: Authentication Docs
  url: auth/docs
paths:
  /api/integrations/{id}/telegram/pairing:
    post:
      tags:
        - Integrations
      summary: Create a Telegram pairing token
      description: >-
        Generates a unique 48-char connect token for the given Telegram
        integration. The user sends this token to the bot via /start <token> to
        pair their Telegram chat.
      operationId: IntegrationsController_createTelegramPairing
      parameters:
        - name: id
          required: true
          in: path
          description: The id of the resource
          schema:
            type: string
        - name: force
          required: true
          in: query
          schema:
            type: string
        - name: X-Workspace-Id
          in: header
          description: Workspace ID
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelegramConnectDto'
                allOf:
                  - $ref: '#/components/schemas/AppResponseSerialization'
components:
  schemas:
    TelegramConnectDto:
      type: object
      properties:
        id:
          type: string
        telegramChatId:
          type: string
        telegramUsername:
          type: string
        telegramFirstName:
          type: string
        telegramLastName:
          type: string
        connectToken:
          type: string
        tokenExpiredAt:
          format: date-time
          type: string
        status:
          type: string
          enum:
            - PENDING
            - CONNECTED
          default: PENDING
        isActive:
          type: boolean
          default: true
        integrationId:
          type: string
        userId:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
        botUsername:
          type: string
          description: Bot username from Telegram API, e.g. "MyAwesomeBot"
      required:
        - id
        - connectToken
        - status
        - isActive
        - integrationId
        - userId
        - createdAt
        - updatedAt

````