Retrieve the captured selfie
curl --request GET \
--url https://api.spoofsense.ai/v1/verification_sessions/{id}/media \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spoofsense.ai/v1/verification_sessions/{id}/media"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spoofsense.ai/v1/verification_sessions/{id}/media', 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.spoofsense.ai/v1/verification_sessions/{id}/media",
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.spoofsense.ai/v1/verification_sessions/{id}/media"
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.spoofsense.ai/v1/verification_sessions/{id}/media")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spoofsense.ai/v1/verification_sessions/{id}/media")
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{
"object": "verification_session_media",
"id": "<string>",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"sha256": "<string>",
"content_type": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing, invalid, or revoked API key"
}
}{
"error": {
"code": "MEDIA_NOT_AVAILABLE",
"message": "No stored capture for this verification session"
}
}{
"error": {
"code": "UPSTREAM_ERROR",
"message": "Inference service unavailable"
}
}Verification sessions
Retrieve the captured selfie
Called from your backend with the secret key — the sst_ client token can never reach this endpoint. Mints a signed URL to the exact bytes the models scored, valid for 5 minutes; fetch immediately rather than storing the link. Verify the download against sha256. Every retrieval is written to your org’s media access log. Available as soon as the decision is — the upload happens during capture.
GET
/
v1
/
verification_sessions
/
{id}
/
media
Retrieve the captured selfie
curl --request GET \
--url https://api.spoofsense.ai/v1/verification_sessions/{id}/media \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spoofsense.ai/v1/verification_sessions/{id}/media"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spoofsense.ai/v1/verification_sessions/{id}/media', 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.spoofsense.ai/v1/verification_sessions/{id}/media",
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.spoofsense.ai/v1/verification_sessions/{id}/media"
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.spoofsense.ai/v1/verification_sessions/{id}/media")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spoofsense.ai/v1/verification_sessions/{id}/media")
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{
"object": "verification_session_media",
"id": "<string>",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"sha256": "<string>",
"content_type": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing, invalid, or revoked API key"
}
}{
"error": {
"code": "MEDIA_NOT_AVAILABLE",
"message": "No stored capture for this verification session"
}
}{
"error": {
"code": "UPSTREAM_ERROR",
"message": "Inference service unavailable"
}
}Authorizations
Your secret key (sk_live_…), server-side only. Also accepted as an x-api-key header.
Path Parameters
The vs_… session id.
Query Parameters
When true, respond with a 302 straight to the image bytes instead of JSON.
Response
Signed media link