Get ICE servers configuration
GET
/api/v1/webrtc/ice-servers
const url = 'http://localhost:3001/api/v1/webrtc/ice-servers';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:3001/api/v1/webrtc/ice-servers \ --header 'Authorization: <Authorization>'Returns STUN/TURN server configuration for WebRTC calls
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
Media typeapplication/json
object
ice_servers
Array<object>
object
credential
TURN credential
string
urls
STUN/TURN server URLs
Array<string>
username
TURN username
string
message
string
success
boolean
Examplegenerated
{ "ice_servers": [ { "credential": "example", "urls": [ "example" ], "username": "example" } ], "message": "example", "success": true}Unauthorized
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Internal Server Error
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}