Skip to main content

Voice SDK Authentication via Credential Based SIP Connections

Prerequisites

  • A valid V2 API key

Creating a Credential Based SIP Connection

The following API request will create a basic credential based SIP connection.
POST /v2/credential_connections HTTP/1.1
Host: api.telnyx.com
Content-Type: application/json
Authorization: Bearer XXX
Content-Length: 169

{
    "active": true,
    "password": "xxx",
    "user_name": "myagent01",
    "anchorsite_override": "Latency",
    "connection_name": "parent-sip-connection"
}
For call flows that make use of Pattern 1 (See Common Usage Patterns), the following additional configuration is required.
PATCH /v2/credential_connections/:id HTTP/1.1
Host: api.telnyx.com
Content-Type: application/json
Authorization: Bearer XXX
Content-Length: 169

{
    "webhook_event_url": "https://mywebhook.com/primary",
    "webhook_event_failover_url": "https://mywebhook.com/backup",
    "webhook_api_version": "2",
    "webhook_timeout_secs": 25,
    "outbound": {
        "call_parking_enabled": true,
        "outbound_voice_profile_id": "123412415234124"
    }
}
For call flows that make use of Pattern 2 (See Common Usage Patterns), the following configuration is required.
PATCH /v2/credential_connections/:id HTTP/1.1
Host: api.telnyx.com
Content-Type: application/json
Authorization: Bearer XXX
Content-Length: 169

{
   "sip_uri_calling_preference": "internal"
}

SDK Authentication

SDKs are authenticated with
  • user_name
  • password

Limits

Sum of the following may not exceed 10,000 for an account.
  • Count of credential connection
  • Count of IP connection
  • Count of FQDN connection
  • Count of external connection
  • Count of TeXML application
  • Count of Call Control Application

Additional Resources