File Sharing

Download files

To retrieve files that have been shared during a video call, first of all you have to find the identifiers, or keys, of the files you want to download.

You can search shared files by using the Get All Uploaded Files API. The available filters are:

  • upload_type: the uploaded file type (file_upload for files that have been shared using the File Share utility or snapshot for pictures taken with the Snapshot tool)
  • user_id: the id of the user who uploaded the files you are looking for
  • session_id: the id of a specific session
  • room_id: the id of a specific room
  • from and to: if you are looking for files shared in a specific time frame, you can use these 2 parameters

Example 1

To retrieve all the files that have been shared between June 1st to June 30th 2024:

curl --request GET \
     --url 'https://api.sandbox.eu.bandyer.com/v2/uploads?from=2024-06-01&to=2024-06-30' \
     --header 'accept: application/json' \
     --header 'apikey: your_api_key'

Example 2

To retrieve all the snapshots that have been captured in room room_e1dab12e6ee4:

curl --request GET \
     --url 'https://api.sandbox.eu.bandyer.com/v2/uploads?upload_type=snapshot&room_id=room_e1dab12e6ee4' \
     --header 'accept: application/json' \
     --header 'apikey: your_api_key'

The response will be in the following format:

{
  "offset": 0,
  "limit": 20,
  "has_more": true,
  "count": 20,
  "uploads": [
    {
      "key": "file key",
      "user_id": "user_id",
      "room_id": "room_id",
      "session_id": "session_id",
      "upload_type": "file_upload | snapshot",
      "creation_date": "2024-06-12T00:00:00Z"
    }
  ]
}

The key parameter represents that file id, and it can be used to obtain a link to download the file.
You can do this by calling the Get Uploaded File API.

curl --request GET \
     --url https://api.sandbox.eu.bandyer.com/v2/uploads/{key} \
     --header 'accept: application/json' \
     --header 'apikey: ak_live_154a722e33b0420f1342e7ad'
{
  "url": "https://upload.bandyer.com/eu/sandbox/...",
  "user_id": "user_id",
  "room_id": "room_e1dab12e6ee4",
  "session_id": "session_id",
  "upload_type": "file upload | snapshot",
  "creation_date": "2024-06-12T00:00:00Z"
}

The url parameter contained in the response allows to download the file.