Download
To get a download link for a recording -> execute a GET request against the /recordings/:id/download endpoint. The id uniquely identifies the recording.
Download link expiration time
Each download link has an expiration time for security reasons. By default the link is valid for one day.
If you want to use a different expiration time, then you need to specify the valid_for_minutes http param. For example to generate a link which will be valid for one week: /recordings/:id/download?valid_for_minutes=10080
Request
curl --request GET \
--url https://api.digitalsamba.com/api/v1/recordings/6e4a5676-c2e8-4c14-90a2-4c6cd71640be/download \
--user YOUR_TEAM_ID:YOUR_DEVELOPER_KEY
import com.fasterxml.jackson.databind.ObjectMapper;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.util.Base64;
import java.util.Map;
String TEAM_ID = "YOUR_TEAM_ID";
String DEVELOPER_KEY = "YOUR_DEVELOPER_KEY";
String authorizationHeader = "Bearer " + Base64.getEncoder().encodeToString((TEAM_ID + ":" + DEVELOPER_KEY).getBytes());
//Put your recording id here - this value is just an example
String recordingId = "c39d7c40-7ff7-4faa-b06f-698a639a9523";
HttpRequest request = HttpRequest.newBuilder()
.GET()
.uri(new URI("https://api.digitalsamba.com/api/v1/recordings/" + recordingId + "/download"))
.header("Authorization", authorizationHeader)
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Body: " + response.body());
Response (200 OK)
{
"link": "https://SambaCloudDomainHere/6e4a5676-c2e8-4c14-90a2-4c6cd71640be.mp4?h=sfYLkq8A9jPe7tTyddq9Sg&expires=1675767898",
"valid_until": "2023-02-07T11:04:58Z"
}
Last updated