Skip to main content
Version: /v2

Get SIP Trunk by ID - API

This API fetches a specific SIP trunk by its database ID or trunkId.

HTTP method and endpoint

GET

|

https://api.videosdk.live/v2/sip-trunk/:id
Headers Parameters

values : YOUR_TOKEN_WITHOUT_ANY_PREFIX

This will be a JWT token generate using VideoSDK ApiKey and Secret.

Note that the token will not include any prefix such as "Basic " or "Bearer ". Just pass a token as value.

You can generate a new token by refering this Guide: Generate Auth token

Parameters
REQUIRED
trunkId of the SIP trunk.
Response Parameters
Public-facing SIP trunk identifier.
Authentication object.
Name of the SIP trunk.
Domain of the SIP trunk.
Trunk direction — 'inbound' or 'outbound'.
List of phone numbers for the trunk.
GET
|
https://api.videosdk.live/v2/sip-trunk/:id
import fetch from 'node-fetch';
const options = {
method: "GET",
headers: {
"Authorization": "Bearer $YOUR_TOKEN",
},
};
const url= `https://api.videosdk.live/v2/sip-trunk/:id`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
RESPONSE
{
"trunkId": "SqlZqn1U1ezvhWGRek6ow",
"auth": {
"username": "naruto",
"password": "password"
},
"name": "twilio",
"domain": "example.pstn.twilio.com",
"direction": "outbound",
"numbers": [
"+12345678"
]
}

Got a Question? Ask us on discord