Latest Legacy

Expire a number masking session

This method terminates an ongoing session and marks it as expired.

DELETE https://api.vtscom.net/v1/Account/{Auth ID}/Masking/Session/{session_uuid}

Response

{
"success”
}

Example Request

1
2
3
4
5
import vts

client = vts.RestClient(auth_id='<auth_id>', auth_token='<auth_token>')
response = client.masking_sessions.delete_masking_session("session_uuid")
print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
var vts = require('vts');

(function main() {
    'use strict';

    var client = new vts.Client("<auth_id>", "<auth_token>");
    client.maskingSession.deleteMaskingSession("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 Delete Session
 */
require 'vendor/autoload.php';
use vts\RestClient;
use vts\Exceptions\VTSRestException;
$client = new RestClient("<auth_id>", "<auth_token>");
try {
    $response = $client->maskingSessions->deleteMaskingSession(
        'SessionUUID'
    );

    print_r($response);
}
catch (VTSRestException $ex) {
    print_r($ex);
}
1
2
curl -X DELETE "https://api.vtscom.net/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/vts/vts-go/v7"
)

func main() {
       client, err := vts.NewClient("<auth_id>", "<auth_token>", &vts.ClientOptions{})
       if err != nil {
               fmt.Print("Error", err.Error())
               return
       }
       response, err := client.MaskingSession.DeleteMaskingSession("SessionUUID")
       if err != nil {
               fmt.Print("Error", err.Error())
               return
       }
       fmt.Printf("Response: %#v\n", response)
}