Poll for the SDP answer
Returns the model’s SDP answer for the connection once it is ready. Until then the
response is 202 with no body; poll again.
Only the user who started the session may call this. A session token works only for the sessions bound to it.
GET
/
sessions
/
{session_id}
/
transport
/
webrtc
/
connections
/
{connection_id}
/
sdp_params
Poll for the SDP answer
curl --request GET \
--url https://api.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params', 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.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"sdp_answer": "v=0\r\no=- 7310496273856150123 2 IN IP4 127.0.0.1\r\n...",
"connection_id": 4321
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}Authorizations
apiKeysessionToken
A Reactor API key (rk_...), sent as Authorization: Bearer rk_.... Keep it on a server.
Headers
The API protocol version the client speaks. Currently 1. Older versions than the server's minimum get 426.
Example:
"1"
The WebRTC signaling protocol version, as major.minor.
Example:
"1.0"
Path Parameters
The session's ID, as returned by POST /sessions.
The connection's ID, as returned when it was registered.
Required range:
1001 <= x <= 9999Example:
4321
⌘I
Poll for the SDP answer
curl --request GET \
--url https://api.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params', 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.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reactor.inc/sessions/{session_id}/transport/webrtc/connections/{connection_id}/sdp_params")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"sdp_answer": "v=0\r\no=- 7310496273856150123 2 IN IP4 127.0.0.1\r\n...",
"connection_id": 4321
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}