This method fetches details of an existing masking session.
GET
https://api.plivo.com/v1/Account/{Auth ID}/Masking/Session/{session_uuid}
{
"api_id": "678c8b24-b703-43aa-8690-d28e7f163d18",
"response": {
"first_party": "919003459051",
"second_party": "918197241073",
"virtual_number": "912269947011",
"status": "expired",
"initiate_call_to_first_party": false,
"first_party_pin": "1234",
"second_party_pin": "4321",
"is_pin_authentication_required": true,
"generate_pin": false,
"generate_pin_length": 4,
"pin_ prompt_play": "https://play.s3.eu-north-1.amazonaws.com/pin_prompt.wav",
"pin_retry": 1,
"pin_retry_wait": "5",
"incorrect_pin_play": "https://play.s3.eu-north-1.amazonaws.com/incorrect_pin.wav",
"session_uuid": "c28b77d4-21e7-43bd-9447-04bfee92e651",
"callback_url": "",
"callback_method": "POST",
"created_time": "2024-02-01 06:28:15 +0000 UTC",
"modified_time": "2024-02-01 06:28:37 +0000 UTC",
"expiry_time": "2024-02-01 06:58:15 +0000 UTC",
"duration": 1800,
"amount": 0,
"call_time_limit": 14400,
"ring_timeout": 45,
"first_party_play_url": "",
"second_party_play_url": "",
"record": true,
"record_file_format": "mp3",
"recording_callback_url": "",
"recording_callback_method": "POST",
"interaction": null,
"total_call_amount": 0,
"total_call_count": 0,
"total_call_billed_duration": 0,
"total_session_amount": 0,
"last_interaction_time": ""
}
}
1
2
3
4
5
import plivo
client = plivo.RestClient(auth_id='<auth_id>', auth_token='<auth_token>')
response = client.masking_sessions.get_masking_session("session_uuid")
print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'rubygems'
require "/root/plivo-ruby/lib/plivo.rb"
include Plivo
include Plivo::Exceptions
api = RestClient.new("<auth_id>", "<auth_token>")
begin
response = api.maskingsession.get('<session_uuid>')
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
1
2
3
4
5
6
7
8
9
10
11
12
13
var plivo = require('plivo');
(function main() {
'use strict';
var client = new plivo.Client("<auth_id>", "<auth_token>");
client.maskingSession.getMaskingSession("SessionUUID"
).then(function (response) {
console.log(response);
}, function (err) {
console.error(err);
});
})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
/**
* Example for Get Session
*/
require 'vendor/autoload.php';
use Plivo\RestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new RestClient("<auth_id>", "<auth_token>");
try {
$response = $client->maskingSessions->getMaskingSession(
'SessionUUID'
);
print_r($response);
}
catch (PlivoRestException $ex) {
print_r($ex);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.plivo.examples;
import com.plivo.api.Plivo;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.exceptions.PlivoValidationException;
import com.plivo.api.models.maskingsession.MaskingSession;
import java.io.IOException;
class getSession {
public static void main(String [] args) {
Plivo.init("<auth_id>","<auth_token>");
try {
MaskingSession response = MaskingSession.getter("<session_uuid>").get();
System.out.println(response);
} catch (PlivoRestException | IOException e) {
System.out.println(e);
e.printStackTrace();
} catch (PlivoValidationException e) {
throw new RuntimeException(e);
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using Plivo;
using Plivo.Exception;
namespace PlivoExamples
{
class Program
{
static void Main(string[] args)
{
var api = new PlivoApi("<auth_id>","<auth_token>");
try
{
var response = api.MaskingSession.Get(sessionUuid: "<session_uuid>");
Console.WriteLine(response);
}
catch (PlivoRestException e)
{
Console.WriteLine("Exception: " + e.Message);
}
}
}
}
1
2
curl -X GET "https://api.plivo.com/v1/Account/{Auth ID}/Masking/Session/{session_uuid}" \
-H "Content-Type: application/json" \
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package main
import (
"fmt"
"github.com/plivo/plivo-go/v7/"
)
func main() {
client, err := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
response, err := client.MaskingSession.GetMaskingSession("Session UUID")
)
if err != nil {
fmt.Print("Error", err.Error())
return
}
fmt.Printf("Response: %#v\n", response)
}