VBScript / Plivo REST API / Retrieve a recording
Back to Collection Items
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.Http")
set http = CreateObject("Chilkat.Http")
http.BasicAuth = 1
http.Login = "{{auth_id}}"
http.Password = "password"
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.StringBuilder")
set sbResponseBody = CreateObject("Chilkat.StringBuilder")
success = http.QuickGetSb("https://api.plivo.com/v1/Account/<auth_id>/Recording/{recording_id}/",sbResponseBody)
If (success = 0) Then
outFile.WriteLine(http.LastErrorText)
WScript.Quit
End If
outFile.WriteLine("Response status code = " & http.LastStatus)
outFile.WriteLine(sbResponseBody.GetAsString())
outFile.Close
Curl Command
curl -X GET
-u '{{auth_id}}:password'
https://api.plivo.com/v1/Account/<auth_id>/Recording/{recording_id}/
Postman Collection Item JSON
{
"name": "Retrieve a recording",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Recording/{recording_id}/",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Recording",
"{recording_id}",
""
]
},
"description": "The following API is used to retrieve a specific recording based on the ‘recording_id’.\n\nMore information can be found [here](https://www.plivo.com/docs/voice/api/recording#retrieve-a-recording)"
},
"response": [
{
"name": "Retrieve a recording",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Recording/{recording_id}/",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Recording",
"{recording_id}",
""
]
}
},
"code": 200,
"_postman_previewlanguage": "json",
"header": [
],
"cookie": [
],
"body": "{\n \"add_time\": \"2014-08-05 16:15:15.852059+05:30\",\n \"api_id\": \"7abf0744-1ca0-11e4-a2d1-22000ac5040c\",\n \"call_uuid\": \"c2c128e2-1c8c-11e4-9bff-1db8a9db0432\",\n \"conference_name\": \"noname\",\n \"recording_duration_ms\": \"345100.00000\",\n \"recording_end_ms\": \"1407235509007.00000\",\n \"recording_format\": \"mp3\",\n \"recording_id\": \"c2186400-1c8c-11e4-a664-0026b945b52x\",\n \"recording_start_ms\": \"1407235163907.00000\",\n \"recording_type\": \"conference\",\n \"recording_url\": \"http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-11e4-a664-0026b945b52x.mp3\",\n \"resource_uri\": \"/v1/Account/MAXXXXXXXXXXXXXXXXXX/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/\"\n}"
}
]
}