JavaScript
import Surge from '@surgeapi/node';
const client = new Surge({
apiKey: process.env['SURGE_API_KEY'], // This is the default and can be omitted
});
const response = await client.recordings.getFile('rec_01kfyc9dgdec1avkgs7tng8htg');
console.log(response.error);import os
from surge import Surge
client = Surge(
api_key=os.environ.get("SURGE_API_KEY"), # This is the default and can be omitted
)
response = client.recordings.get_file(
"rec_01kfyc9dgdec1avkgs7tng8htg",
)
print(response.error)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/surge-go"
"github.com/stainless-sdks/surge-go/option"
)
func main() {
client := surge.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Recordings.GetFile(context.TODO(), "rec_01kfyc9dgdec1avkgs7tng8htg")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Error)
}require "surge_api"
surge = SurgeAPI::Client.new(api_key: "My API Key")
response = surge.recordings.get_file("rec_01kfyc9dgdec1avkgs7tng8htg")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Surge\Client;
use Surge\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('SURGE_API_KEY') ?: 'My API Key');
try {
$response = $client->recordings->getFile('rec_01kfyc9dgdec1avkgs7tng8htg');
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}curl --request GET \
--url https://api.surge.app/recordings/{recording_id}/file \
--header 'Authorization: Bearer <token>'HttpResponse<String> response = Unirest.get("https://api.surge.app/recordings/{recording_id}/file")
.header("Authorization", "Bearer <token>")
.asString();This response has no body data.{
"error": {
"message": "The requested resource could not be found.",
"type": "not_found"
}
}Recordings
Download recording file
Download the audio file for a call recording. Returns a redirect to a short-lived signed URL.
GET
/
recordings
/
{recording_id}
/
file
JavaScript
import Surge from '@surgeapi/node';
const client = new Surge({
apiKey: process.env['SURGE_API_KEY'], // This is the default and can be omitted
});
const response = await client.recordings.getFile('rec_01kfyc9dgdec1avkgs7tng8htg');
console.log(response.error);import os
from surge import Surge
client = Surge(
api_key=os.environ.get("SURGE_API_KEY"), # This is the default and can be omitted
)
response = client.recordings.get_file(
"rec_01kfyc9dgdec1avkgs7tng8htg",
)
print(response.error)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/surge-go"
"github.com/stainless-sdks/surge-go/option"
)
func main() {
client := surge.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Recordings.GetFile(context.TODO(), "rec_01kfyc9dgdec1avkgs7tng8htg")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Error)
}require "surge_api"
surge = SurgeAPI::Client.new(api_key: "My API Key")
response = surge.recordings.get_file("rec_01kfyc9dgdec1avkgs7tng8htg")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Surge\Client;
use Surge\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('SURGE_API_KEY') ?: 'My API Key');
try {
$response = $client->recordings->getFile('rec_01kfyc9dgdec1avkgs7tng8htg');
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}curl --request GET \
--url https://api.surge.app/recordings/{recording_id}/file \
--header 'Authorization: Bearer <token>'HttpResponse<String> response = Unirest.get("https://api.surge.app/recordings/{recording_id}/file")
.header("Authorization", "Bearer <token>")
.asString();This response has no body data.{
"error": {
"message": "The requested resource could not be found.",
"type": "not_found"
}
}⌘I