List sessions
const options = {method: 'GET'};
fetch('https://api.example.com/v1/regions/global/auth/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/auth/sessions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url https://api.example.com/v1/regions/global/auth/sessionsimport requests
url = "https://api.example.com/v1/regions/global/auth/sessions"
response = requests.get(url)
print(response.text){
"success": true,
"data": [
{
"id": "<string>",
"userId": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"ipAddress": "<string>",
"userAgent": "<string>",
"lastActiveAt": "2023-11-07T05:31:56Z"
}
]
}Authentication
List sessions
List active sessions for the current user
GET
/
v1
/
regions
/
global
/
auth
/
sessions
List sessions
const options = {method: 'GET'};
fetch('https://api.example.com/v1/regions/global/auth/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/auth/sessions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url https://api.example.com/v1/regions/global/auth/sessionsimport requests
url = "https://api.example.com/v1/regions/global/auth/sessions"
response = requests.get(url)
print(response.text){
"success": true,
"data": [
{
"id": "<string>",
"userId": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"ipAddress": "<string>",
"userAgent": "<string>",
"lastActiveAt": "2023-11-07T05:31:56Z"
}
]
}Was this page helpful?