Latest Legacy

Get details of a number masking session

This method fetches details of an existing masking session.

GET https://api.plivo.com/v1/Account/{Auth ID}/Masking/Session/{session_uuid}

Response

{
"session_uuid": "abcd-1234-ab12-cd34",
"virtual_number": "+12205550020",
"status": "active",
"first_party": "+14155552345",
"second_party": "+12165554567",
"record": "false",
"recording_callback_url":"null",
"record_file_format": null, 
"session_expiry": "3600",
"call_time_limit": "3600",
"initiate_call_to_first_party": "false",
"callback_url": "https://www.example.com/callback",
"ring_timeout": "120",
"first_party_play_url": "https://www.example.com/playurl1",
"second_party_play_url": "https://www.example.com/playurl2", 
"created_time": "2023-08-17 21:26:44",
"modified_time": "2023-08-17 21:27:10",
"expiry_time": "2023-08-17 21:56:44",
"last_interaction_time": " 2023-08-17 21:29:26",
"total_call_count": "4",
"total_call_amount": "0.123",
"total_call_billed_duration": "180",
"interaction": "{
"first_party_resource_url": "/Account/{auth_id}/Call/{first_party_call_uuid}/",
"second_party_resource_url": "https://api.plivo.com/v1/Account/{auth_id}/Call/{second_party_call_uuid}/",
"recording_resource_url": "null"
}

Example Request

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
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
curl -X GET "https://api.plivo.com/v1/Account/{Auth ID}/Masking/Session/abcd-1234-ab12-cd34" \
-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
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("SessionUUID")
       if err != nil {
               fmt.Print("Error", err.Error())
               return
       }
       fmt.Printf("Response: %#v\n", response)
}