curl --request POST \
--url https://api.daily.co/v1/sip-clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "myroom.0",
"password": "<string>",
"expires_in_seconds": 123
}
'import requests
url = "https://api.daily.co/v1/sip-clients"
payload = {
"username": "myroom.0",
"password": "<string>",
"expires_in_seconds": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({username: 'myroom.0', password: '<string>', expires_in_seconds: 123})
};
fetch('https://api.daily.co/v1/sip-clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.daily.co/v1/sip-clients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'username' => 'myroom.0',
'password' => '<string>',
'expires_in_seconds' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.daily.co/v1/sip-clients"
payload := strings.NewReader("{\n \"username\": \"myroom.0\",\n \"password\": \"<string>\",\n \"expires_in_seconds\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.daily.co/v1/sip-clients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"myroom.0\",\n \"password\": \"<string>\",\n \"expires_in_seconds\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daily.co/v1/sip-clients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"myroom.0\",\n \"password\": \"<string>\",\n \"expires_in_seconds\": 123\n}"
response = http.request(request)
puts response.read_body{
"username": "<string>",
"domain": "examplecorp.sip-us.daily.co",
"sip_uri": "sip:myroom.0@examplecorp.sip-us.daily.co",
"password": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": "invalid-request-error",
"info": "missing required field"
}Create a SIP client
Register a plain SIP client for your domain. Returns the client’s SIP URI and a generated password, shown ONCE and never returned again. Provide a username (a room-style name, optionally suffixed with .<number>); supply your own password or let one be generated. An optional expires_in_seconds sets a TTL after which the client is removed automatically - omit it for a long-lived client. Subject to a per-domain client limit.
curl --request POST \
--url https://api.daily.co/v1/sip-clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "myroom.0",
"password": "<string>",
"expires_in_seconds": 123
}
'import requests
url = "https://api.daily.co/v1/sip-clients"
payload = {
"username": "myroom.0",
"password": "<string>",
"expires_in_seconds": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({username: 'myroom.0', password: '<string>', expires_in_seconds: 123})
};
fetch('https://api.daily.co/v1/sip-clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.daily.co/v1/sip-clients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'username' => 'myroom.0',
'password' => '<string>',
'expires_in_seconds' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.daily.co/v1/sip-clients"
payload := strings.NewReader("{\n \"username\": \"myroom.0\",\n \"password\": \"<string>\",\n \"expires_in_seconds\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.daily.co/v1/sip-clients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"myroom.0\",\n \"password\": \"<string>\",\n \"expires_in_seconds\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daily.co/v1/sip-clients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"myroom.0\",\n \"password\": \"<string>\",\n \"expires_in_seconds\": 123\n}"
response = http.request(request)
puts response.read_body{
"username": "<string>",
"domain": "examplecorp.sip-us.daily.co",
"sip_uri": "sip:myroom.0@examplecorp.sip-us.daily.co",
"password": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": "invalid-request-error",
"info": "missing required field"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
SIP username: letters, digits, '-' and '_' (a room name), optionally followed by . (e.g. myroom.0). Up to 64 chars. Must be unique within your domain.
"myroom.0"
Optional. 12-64 chars with at least one letter and one digit. If omitted, a password is generated and returned once in the response.
Optional TTL in seconds (60-2592000). The client is removed automatically after it elapses. Omit for a long-lived client.