Download a recording as MP3
const url = 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/Recordings/9b1d7e0c-2f4a-4c1e-8f3b-5a6d7c8e9f00.mp3';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.siprtc.io/v1/Accounts/AC000000000000000000/Recordings/9b1d7e0c-2f4a-4c1e-8f3b-5a6d7c8e9f00.mp3 \ --header 'Authorization: Basic <credentials>'Returns the recording’s audio when it is stored as MP3 (the usual format). Requires a role in access.playback_roles. Unencrypted and customer_key recordings answer 302 to a 15 minute presigned URL (customer_key audio is SPE1 ciphertext you decrypt with your private key; see encryption_details on the resource); platform-encrypted recordings are decrypted and streamed by the API with Cache-Control private, no-store. Every fetch is written to AuditEvents as recording.accessed. A deleted recording, or one stored in another format, answers 404.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Account Auth ID
Example
AC000000000000000000Recording SID (UUID)
Example
9b1d7e0c-2f4a-4c1e-8f3b-5a6d7c8e9f00Responses
Section titled “ Responses ”Decrypted audio (platform-encrypted recordings)
Redirect to a 15 minute presigned URL of the stored object
Authentication failed: missing or invalid credentials (JSON string from the API gateway)
Role not in access.playback_roles, or login not of this account (code 20403)
object
Error code: 20001 invalid parameter, 20403 forbidden, 20404 not found, 20409 conflict, 20503 unavailable, 64030 under legal hold, 64031 active encryption key.
Example
20404Human readable explanation.
Example
the requested resource was not foundLink to more information; currently always empty.
Example
HTTP status code of the response.
Example
404Recording deleted, stored as WAV, or media missing (code 20404)
object
Error code: 20001 invalid parameter, 20403 forbidden, 20404 not found, 20409 conflict, 20503 unavailable, 64030 under legal hold, 64031 active encryption key.
Example
20404Human readable explanation.
Example
the requested resource was not foundLink to more information; currently always empty.
Example
HTTP status code of the response.
Example
404Storage, decryption or settings unavailable (code 20503)
object
Error code: 20001 invalid parameter, 20403 forbidden, 20404 not found, 20409 conflict, 20503 unavailable, 64030 under legal hold, 64031 active encryption key.
Example
20404Human readable explanation.
Example
the requested resource was not foundLink to more information; currently always empty.
Example
HTTP status code of the response.
Example
404