Delete the user session.
Once deleted, it cannot be retrieved.
curl --request DELETE \
--url https://{apiBaseUrl}/v2/{sessionId}/sessionconst url = 'https://{apiBaseUrl}/v2/{sessionId}/session';
const options = {method: 'DELETE'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v2/{sessionId}/session"
response = requests.delete(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/v2/{sessionId}/session",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://{apiBaseUrl}/v2/{sessionId}/session");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.delete("https://{apiBaseUrl}/v2/{sessionId}/session")
.asString();{
"code": "InvalidSessionId"
}{
"code": "InvalidUserAuthentication",
"message": "<string>"
}Session
Delete the user session
Delete the user session
DELETE
/
v2
/
{sessionId}
/
session
Delete the user session.
Once deleted, it cannot be retrieved.
curl --request DELETE \
--url https://{apiBaseUrl}/v2/{sessionId}/sessionconst url = 'https://{apiBaseUrl}/v2/{sessionId}/session';
const options = {method: 'DELETE'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v2/{sessionId}/session"
response = requests.delete(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/v2/{sessionId}/session",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://{apiBaseUrl}/v2/{sessionId}/session");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.delete("https://{apiBaseUrl}/v2/{sessionId}/session")
.asString();{
"code": "InvalidSessionId"
}{
"code": "InvalidUserAuthentication",
"message": "<string>"
}Was this page helpful?