Get ICE Config
Returns the STUN/TURN ICE servers that clients use to establish reliable WebRTC connections with Orga AI.
This endpoint should be called from your server proxy or any backend environment — never directly with an API key.
You must include an ephemeral token in the Authorization header:
Authorization: Bearer <ephemeral_token>
Headers
| Name | Required | Description |
|---|---|---|
Authorization | ✅ | The ephemeral token issued by POST /v1/realtime/client-secrets |
Content-Type | ✅ | application/json |
Request Body
Empty body — this endpoint currently does not accept any JSON fields.
Example Request (cURL)
curl -X GET "https://api.orga-ai.com/v1/realtime/ice-config" \
-H "Authorization: Bearer <ephemeral_token>" \
-H "Content-Type: application/json"Example Response
{
"iceServers": [
{
"urls": ["stun:stun1.l.google.com:19302", "stun:stun2.l.google.com:19302"]
},
{
"urls": ["stun:stun3.l.google.com:19302", "stun:stun4.l.google.com:19302"]
},
{
"urls": ["turn:turn.orga-ai.com:3478?transport=udp"],
"username": "g08b0b08f0e028711b6fc5e4a88153ad228874a3b3bb1bca9c5c1fac469a818d",
"credential": "1cffe2930aeb66b40c414b1ad50ebf642f5bea59f2d89ffce66b13e97318f685"
}
]
}| Field | Type | Description |
|---|---|---|
| iceServers | array | List of ICE (STUN/TURN) servers used for WebRTC connectivity |
| urls | array | URLs of ICE servers |
| username | string | TURN authentication username (present only for TURN servers) |
| credential | string | TURN password (present only for TURN servers) |
Error Responses
401 - Invalid Ephemeral Token
Returned when the provided ephemeral token is invalid or expired.
{
"error": {
"message": "Invalid ephemeral token",
"type": "invalid_request_error",
"param": null,
"code": null
}
}403 - Missing Authorization Header
Returned when no Authorization header or token is provided.
{
"error": {
"message": "Not authenticated",
"type": "invalid_request_error",
"param": null,
"code": null
}
}Usage Notes
-
ICE configuration is required for reliable WebRTC connectivity (especially across NAT/firewall boundaries).
-
The response includes both public STUN servers and authenticated TURN servers.
-
Always fetch new ICE configs for each new ephemeral token.
-
This endpoint can safely be proxied from your backend to your clients — it never uses the permanent API key.
💡 Tip: Your SDK already calls this endpoint internally after obtaining an ephemeral token.