/v1/media/{id}

Prev Next
Get
/v1/media/{id}

Returns the media file associated with the specific media Id = {id}

To get the media Id of a specific media file, request a list of media from GET attempts/{attemptId}/media or GET sessions/{sessionId}/media endpoint. The specific media file's id is in images.id or videos.id parameter.

Note about the size of images captured with the end-user flow

  • All images with one edge larger that 1920px are proportionally reduced, so the longer edge is max 1920px
  • There should be no size limits to the images when downloading
  • There should be no resolution limits when downloading, except the fact that images >1920px were reduced


Note: always ensure that you use the correct API URL to send requests. See the API URL section for more info.


Security
API Key: api_key
Header parameter namex-auth-client

Your integration's API key (occasionally referred to the "Token", "API public key" or "Publishable key")

Header parameters
x-hmac-signature
stringRequired

Media id signed with the shared secret key

Path parameters
id
stringRequired

Media id

Responses
200

Media file

Headers
x-auth-client
string
Your integration's API key. Required to identify the request or response sender. Occasionally referred to as the "API token".
x-hmac-signature
string
Response body signed with the shared secret key. Required to authenticate the response sender.
vrf-auth-client
string
Your integration's API key. Required to identify the request or response sender. Same as x-auth-client.
vrf-hmac-signature
string
Response body signed with the shared secret key. Required to authenticate the response sender. Same as x-hmac-signature.
400

Bad request

object
status
string
Valid values[ "fail" ]
Examplefail
code
string
Example1101
message
string
ExampleValidation failed
401

Unauthorized

object
status
string
Valid values[ "fail" ]
Examplefail
code
string
Example1101
message
string
ExampleMandatory X-AUTH-CLIENT header containing the API key is missing from the request.
404

Media not found

object
status
string
Valid values[ "fail" ]
Examplefail
code
string
Example1101
message
string
ExampleResource not found
500

Internal server error

object
status
string
Valid values[ "fail" ]
Examplefail
code
string
Example1101
message
string
ExampleSomething went wrong

Sample how to store response data to file (image or video)

Below is a simple example how to download media with Node.js and save the data to file.

This is applicable for both video and image files. Just make sure to use correct file extension which you can find in the response of GET sessions/{id}/media call, as images.mimetype or video.mimetype.

Text
media_url = '/v1/media/05cfc122-15d8-4838-bbf1-7b26a736b2d2'

headers = {
    'X-AUTH-CLIENT': 'API-PUBLIC-KEY',
    'VRF-AUTH-CLIENT': 'API-PUBLIC-KEY',
    'X-HMAC-SIGNATURE': '452bfca0e02f8ee0f56d97373cc6971067e43149f1b7e58b681d4e57353a2f6b',
    'VRF-HMAC-SIGNATURE': '452bfca0e02f8ee0f56d97373cc6971067e43149f1b7e58b681d4e57353a2f6b',
    'Content-Type': 'application/json',
}

response = requests.get(media_url, headers=headers)

with open('media_filename.webm', 'wb') as media_file:
    for chunk in response.iter_content():
        media_file.write(chunk)


Image files

Sample how to download image files to file.

Text
media_url = '/v1/media/2b3b3a9f-d73d-445a-aabe-9b41c1c1a2ac'

headers = {
    'X-AUTH-CLIENT': 'API-PUBLIC-KEY',
    'VRF-AUTH-CLIENT': 'API-PUBLIC-KEY',
    'X-HMAC-SIGNATURE': '452bfca0e02f8ee0f56d97373cc6971067e43149f1b7e58b681d4e57353a2f6b',
    'VRF-HMAC-SIGNATURE': '452bfca0e02f8ee0f56d97373cc6971067e43149f1b7e58b681d4e57353a2f6b',
    'Content-Type': 'application/json',
}

response = requests.get(media_url, headers=headers)
with open('image_file_name.jpg', 'wb') as write_file:
    write_file.write(response.content)


Video files

Sample how to download video files to file.

Text
media_url = '/v1/media/05cfc122-15d8-4838-bbf1-7b26a736b2d2'

headers = {
    'X-AUTH-CLIENT': 'API-PUBLIC-KEY',
    'VRF-AUTH-CLIENT': 'API-PUBLIC-KEY',
    'X-HMAC-SIGNATURE': '452bfca0e02f8ee0f56d97373cc6971067e43149f1b7e58b681d4e57353a2f6b',
    'VRF-HMAC-SIGNATURE': '452bfca0e02f8ee0f56d97373cc6971067e43149f1b7e58b681d4e57353a2f6b',
    'Content-Type': 'application/json',
}

response = requests.get(media_url, headers=headers)

with open('media_filename.webm', 'wb') as media_file:
    for chunk in response.iter_content():
        media_file.write(chunk)




Document Versioning

Article Versioning

Date

Description

Aug 6, 2025

Response headers added

Mar 12, 2025

Documentation published