Get session information
curl --request GET \
--url http://localhost:3000/api/messaging/sessions/{sessionId}import requests
url = "http://localhost:3000/api/messaging/sessions/{sessionId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3000/api/messaging/sessions/{sessionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/messaging/sessions/{sessionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/messaging/sessions/{sessionId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3000/api/messaging/sessions/{sessionId}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/messaging/sessions/{sessionId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body// 404 - Session not found
{
"error": "Session not found",
"code": "SESSION_NOT_FOUND",
"details": {
"sessionId": "abc-123"
}
}
// 410 - Session expired
{
"error": "Session has expired",
"code": "SESSION_EXPIRED",
"details": {
"sessionId": "abc-123",
"expiresAt": "2024-01-15T10:30:00Z"
}
}
Session Management
Get Session
Retrieve session details, status, and remaining time
GET
/
api
/
messaging
/
sessions
/
{sessionId}
Get session information
curl --request GET \
--url http://localhost:3000/api/messaging/sessions/{sessionId}import requests
url = "http://localhost:3000/api/messaging/sessions/{sessionId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3000/api/messaging/sessions/{sessionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/messaging/sessions/{sessionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/messaging/sessions/{sessionId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3000/api/messaging/sessions/{sessionId}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/messaging/sessions/{sessionId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body// 404 - Session not found
{
"error": "Session not found",
"code": "SESSION_NOT_FOUND",
"details": {
"sessionId": "abc-123"
}
}
// 410 - Session expired
{
"error": "Session has expired",
"code": "SESSION_EXPIRED",
"details": {
"sessionId": "abc-123",
"expiresAt": "2024-01-15T10:30:00Z"
}
}
This endpoint returns comprehensive session information including timeout configuration, renewal count, and real-time expiration status.
Path Parameters
string
required
The unique identifier of the session
Response
string
Unique session identifier
string
UUID of the agent
string
UUID of the user
string
ISO timestamp of session creation
string
ISO timestamp of last activity in the session
string
ISO timestamp when the session will expire
object
number
Number of times the session has been renewed
number
Milliseconds until session expiration
boolean
Whether the session is within the warning threshold
object
Any metadata attached to the session
Error Responses
// 404 - Session not found
{
"error": "Session not found",
"code": "SESSION_NOT_FOUND",
"details": {
"sessionId": "abc-123"
}
}
// 410 - Session expired
{
"error": "Session has expired",
"code": "SESSION_EXPIRED",
"details": {
"sessionId": "abc-123",
"expiresAt": "2024-01-15T10:30:00Z"
}
}
Path Parameters
ID of the session
Response
Session information retrieved successfully
When the session will expire
Current timeout configuration
Show child attributes
Show child attributes
Number of times the session has been renewed
Milliseconds until session expiration
Whether the session is within the warning threshold
Was this page helpful?

