Create a SIP session credential
POST
/v1/voice/session-credentials
const credential = await bird.voice.sessionCredentials.create();
// The password is returned once. Until `expires_at` it can place billed calls.
console.log(credential.username, credential.realm, credential.expires_at);credential = client.voice.session_credentials.create()
# The password is returned once. Until expires_at it can place billed calls.
print(credential.username, credential.realm, credential.expires_at)credential, err := client.Voice.SessionCredentials.Create(context.Background())
if err != nil {
log.Fatal(err)
}
// The password is returned once. Until ExpiresAt it can place billed calls.
fmt.Println(credential.Username, credential.Realm, credential.ExpiresAt)$credential = $bird->voice->sessionCredentials->create();
// The password is returned once. Until expires_at it can place billed calls.
echo $credential->getUsername(), ' ', $credential->getRealm(), "\n";bird voice session-credentials createcurl -X POST "https://us1.platform.bird.com/v1/voice/session-credentials" \
-H "Authorization: Bearer $TOKEN"Respuesta201
{
"username": "bird",
"password": "8Kx2mQ7pR4tYvB9nL3sW6dF1gH5jC0aZ",
"realm": "01ARZ3NDEKTSV4RRFFQ69G5FAV.sip.bird.com",
"expires_at": "2026-07-30T12:05:00Z",
"handshake_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3ODU0NDMwMzV9.fp1xWxROEmgCafwiJ-ZHbZg9cIdYC-wLGcH-5gIVbco"
}
Issues a workspace-scoped SIP digest credential valid for five minutes. The password appears only in this response; create another credential if you lose it. Trunks must allow session credentials to accept it.
The request has no body. Each successful request creates a fresh credential, including retries. Keep retries bounded: creating more than 20 live credentials for the same caller invalidates the oldest. Treat the password as a bearer secret until expires_at.
Carga de respuesta
username
string
obligatorio
SIP digest username. Always bird. The credential identifies the workspace through realm. The username does not identify the workspace.
password
string
obligatorio
SIP digest password, returned once. Treat it as a bearer secret: until it expires it can place calls billed to this workspace.
realm
string
obligatorio
SIP digest realm to authenticate against. Workspace-scoped, so a credential minted for one workspace cannot authenticate against another.
expires_at
string
obligatorio
When the credential stops authenticating, five minutes after creation. Existing calls may continue; use a fresh credential for later authentication.
handshake_token
string
Short-lived token required when upgrading the WebSocket connection. The token authorizes the connection only; each call still authenticates with password.
Recursos relacionados
Continúa con la documentación, guías y ejemplos sobre este tema. Los recursos están en inglés.
Comprender el conceptoShould I use a Bird SDK or call the API directly?Seguir la ruta de aprendizajeBuild your first integrationGuía de implementaciónSend your first email
Obtener un resumen de implementación