---
title: "Generate a WebRTC login token"
method: POST
path: "/telephony/login"
tags: ["Telephony"]
---

# Generate a WebRTC login token

`POST /telephony/login`

## Request

- Base URL: `https://api.leadping.ai`
- URL: `https://api.leadping.ai/telephony/login`
- Auth: HTTP bearer

The issued client configuration is scoped to the authenticated user and contains only the short-lived credentials required by the calling client.

## Request body

- TelephonyLoginRequest: Identifies the Leadping user and calling context for which a short-lived telephony client token should be issued.
  - `includeIncoming` boolean: Includes credentials for receiving calls to the authenticated organization.
  - `device` IdNamePair, nullable: User summary connected to this automation configuration response.
    - `id` string, required
    - `name` string, required

## Response `200`

Login token was successfully generated.

- TelephonyLoginResponse: Provides the short-lived access token and client configuration required to initialize an authenticated Leadping calling session.
  - `incomingUsername` string, nullable: Username for the organization's incoming SIP connection, when requested and configured.
  - `incomingPassword` string, nullable: Password for the organization's incoming SIP connection, when requested and configured.
  - `username` string: Username for this telephony login.
  - `password` string: Password for this telephony login.
  - `expiresAt` string, date-time, nullable: UTC deadline for refreshing this authorized phone login.
  - `callbackToken` string: Callback token for this telephony login.

## Other responses

- `400`: The request was invalid or malformed.
- `401`: The user is not authenticated.
- `403`: The caller does not have permission to perform this operation.
- `404`: The requested resource or required account context was not found.
- `415`: The request content type is not supported by this endpoint.
- `429`: The client or account rate limit was exceeded. Retry after the interval in the Retry-After header.
- `500`: An unexpected error prevented the server from completing the request.

## Changes

- **2026-11-11** `81aed8c9afb7`: 3 info
  - added the non-success response with the status `404`
  - added the non-success response with the status `415`
  - added the non-success response with the status `500`
- **2026-11-04** `56abbde43c55`: 4 info
  - added the new optional request property `allOf[#/components/schemas/TelephonyLoginRequest]/includeIncoming` (media type: application/json)
  - added the new optional request property `allOf[#/components/schemas/TelephonyLoginRequest]/includeIncoming` (media type: application/*+json)
  - added the optional property `allOf[#/components/schemas/TelephonyLoginResponse]/incomingPassword` to the response with the `200` status
  - added the optional property `allOf[#/components/schemas/TelephonyLoginResponse]/incomingUsername` to the response with the `200` status

[Operation history](https://skmtc.dev/leadping/apis/leadping-api/changes/telephony/login/post.md)

---

[API](https://skmtc.dev/leadping/apis/leadping-api.md) - [All operations](https://skmtc.dev/leadping/apis/leadping-api/llms.txt) - [OpenAPI document](https://skmtc.dev/leadping/apis/leadping-api/revisions/bf1852acaf45?raw)
