List Terminals
curl --request GET \
--url https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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 := "https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals")
.header("x-api-key", "<api-key>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-api-key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"terminals": [
{
"connectionId": "abc123xyz",
"terminalId": "TERM-001",
"deviceId": "TERM-001",
"connectedAt": "2024-01-15T10:30:00.000Z",
"lastActivity": "2024-01-15T10:35:00.000Z",
"status": "online",
"metadata": {}
}
],
"count": 1,
"timestamp": "2024-01-15T10:35:30.000Z"
}Terminal Gateway API
List Terminals
Retrieve all active terminals in your group with connection details and status
GET
/
v1
/
terminals
List Terminals
curl --request GET \
--url https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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 := "https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals")
.header("x-api-key", "<api-key>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.sbx.moduluslabs.io/v1/terminal-gateway/v1/terminals");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-api-key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"terminals": [
{
"connectionId": "abc123xyz",
"terminalId": "TERM-001",
"deviceId": "TERM-001",
"connectedAt": "2024-01-15T10:30:00.000Z",
"lastActivity": "2024-01-15T10:35:00.000Z",
"status": "online",
"metadata": {}
}
],
"count": 1,
"timestamp": "2024-01-15T10:35:30.000Z"
}This endpoint requires HMAC-SHA256 authentication. See Authentication for signature computation details.
Terminal ID Usage
The response includes bothconnectionId and deviceId for each terminal:
- deviceId (Recommended) - Stable identifier that persists across reconnections
- connectionId - Temporary identifier that changes when a terminal reconnects
deviceId when initiating payments for reliable terminal targeting.Authorizations
HMAC-SHA256 authentication. Requires three headers: x-api-key (your API key), x-timestamp (ISO 8601 timestamp), and x-signature (Base64-encoded HMAC-SHA256 signature). See Authentication documentation for signature computation.
Was this page helpful?