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

# Generate a WebRTC login token

> Generates a Leadping WebRTC login token so authenticated agents can connect to telephony services and place or receive browser-based calls.



## OpenAPI

````yaml /openapi.json post /telephony/login
openapi: 3.1.1
info:
  title: Leadping API
  description: >-
    Leadping API for lead intake, messaging, calling, automations, billing,
    organization settings, and compliant lead communication workflows.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: v1
servers:
  - url: https://api.leadping.ai
    description: Production
security: []
tags:
  - name: Analytics
  - name: Automations
  - name: Contact
  - name: Conversations
  - name: Feedback
  - name: Leads
  - name: LeadStatusChanges
  - name: LeadStatuses
  - name: Notifications
  - name: OutboundDelivery
  - name: Sources
  - name: Suppressions
  - name: Tags
  - name: Users
  - name: Calls
  - name: PhoneNumbers
  - name: Sms
  - name: Telephony
  - name: Organizations
  - name: UserDataExports
  - name: CallEvents
  - name: Events
  - name: SmsEvents
  - name: PaymentMethods
  - name: Transactions
  - name: Usage
  - name: Wallets
paths:
  /telephony/login:
    post:
      tags:
        - Telephony
      summary: Generate a WebRTC login token
      description: >-
        Generates a Leadping WebRTC login token so authenticated agents can
        connect to telephony services and place or receive browser-based calls.
      operationId: Telephony_Login
      requestBody:
        description: The telephony login request containing connection details.
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TelephonyLoginRequest'
              description: Request model for telephony login token generation.
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TelephonyLoginRequest'
              description: Request model for telephony login token generation.
        required: true
      responses:
        '200':
          description: Login token was successfully generated.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/TelephonyLoginResponse'
                description: Response model for telephony login token generation.
        '400':
          description: The request was invalid or malformed.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ProblemDetails'
                description: >-
                  Standard problem-details response containing machine-readable
                  and human-readable information about an HTTP API error.
        '401':
          description: The user is not authenticated.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ProblemDetails'
                description: >-
                  Standard problem-details response containing machine-readable
                  and human-readable information about an HTTP API error.
components:
  schemas:
    TelephonyLoginRequest:
      type: object
      properties:
        device:
          type:
            - 'null'
            - object
          allOf:
            - $ref: '#/components/schemas/IdNamePair'
          description: Identifier and display name of the related device.
      description: Request model for telephony login token generation.
    TelephonyLoginResponse:
      type: object
      properties:
        username:
          type: string
          description: Username for this telephony login.
        password:
          type: string
          description: Password for this telephony login.
        expiresAt:
          type:
            - 'null'
            - string
          description: UTC timestamp for expires at on this telephony login.
          format: date-time
        callbackToken:
          type: string
          description: Callback token for this telephony login.
      description: Response model for telephony login token generation.
    ProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
          description: URI reference that identifies the problem type.
        title:
          type:
            - 'null'
            - string
          description: Short, human-readable summary of the problem.
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          description: HTTP status code returned for the problem.
          format: int32
        detail:
          type:
            - 'null'
            - string
          description: >-
            Human-readable explanation specific to this occurrence of the
            problem.
        instance:
          type:
            - 'null'
            - string
          description: >-
            URI reference that identifies this specific occurrence of the
            problem.
      description: >-
        Standard problem-details response containing machine-readable and
        human-readable information about an HTTP API error.
    IdNamePair:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: string
          description: The unique identifier.
        name:
          type: string
          description: The display name.
      description: >-
        A minimal Record type with an (string), (string), and maximum JSON
        compatibility. The reason for this type (over something like
        KeyValuePair, dictionary) is because of JSON serialization support.

````