curl https://hapi.7331.org/v1/users/me/sessions \
-b cookies.txt
{
"sessions": [
{
"token_suffix": "abc123",
"created_at": "2026-03-01T10:00:00Z",
"expires_at": "2026-03-31T10:00:00Z",
"client_ip": "203.0.113.1",
"geo": {
"country": "US",
"city": "San Francisco",
"region": "California"
},
"is_current": true
},
{
"token_suffix": "xyz789",
"created_at": "2026-02-20T08:00:00Z",
"expires_at": "2026-03-22T08:00:00Z",
"client_ip": "198.51.100.5",
"geo": {
"country": "DE",
"city": "Berlin",
"region": "Berlin"
},
"is_current": false
}
],
"geo_map": {
"203.0.113.1": {"country": "US", "city": "San Francisco", "region": "California"},
"198.51.100.5": {"country": "DE", "city": "Berlin", "region": "Berlin"}
},
"login_history": {
"203.0.113.1": [
{"ts": "2026-03-01T10:00:00Z", "ua": "Mozilla/5.0"}
]
}
}
List all active sessions for the authenticated user with geo data.
curl https://hapi.7331.org/v1/users/me/sessions \
-b cookies.txt
{
"sessions": [
{
"token_suffix": "abc123",
"created_at": "2026-03-01T10:00:00Z",
"expires_at": "2026-03-31T10:00:00Z",
"client_ip": "203.0.113.1",
"geo": {
"country": "US",
"city": "San Francisco",
"region": "California"
},
"is_current": true
},
{
"token_suffix": "xyz789",
"created_at": "2026-02-20T08:00:00Z",
"expires_at": "2026-03-22T08:00:00Z",
"client_ip": "198.51.100.5",
"geo": {
"country": "DE",
"city": "Berlin",
"region": "Berlin"
},
"is_current": false
}
],
"geo_map": {
"203.0.113.1": {"country": "US", "city": "San Francisco", "region": "California"},
"198.51.100.5": {"country": "DE", "city": "Berlin", "region": "Berlin"}
},
"login_history": {
"203.0.113.1": [
{"ts": "2026-03-01T10:00:00Z", "ua": "Mozilla/5.0"}
]
}
}
Show properties
{ts, ua}), most recent first.curl https://hapi.7331.org/v1/users/me/sessions \
-b cookies.txt
{
"sessions": [
{
"token_suffix": "abc123",
"created_at": "2026-03-01T10:00:00Z",
"expires_at": "2026-03-31T10:00:00Z",
"client_ip": "203.0.113.1",
"geo": {
"country": "US",
"city": "San Francisco",
"region": "California"
},
"is_current": true
},
{
"token_suffix": "xyz789",
"created_at": "2026-02-20T08:00:00Z",
"expires_at": "2026-03-22T08:00:00Z",
"client_ip": "198.51.100.5",
"geo": {
"country": "DE",
"city": "Berlin",
"region": "Berlin"
},
"is_current": false
}
],
"geo_map": {
"203.0.113.1": {"country": "US", "city": "San Francisco", "region": "California"},
"198.51.100.5": {"country": "DE", "city": "Berlin", "region": "Berlin"}
},
"login_history": {
"203.0.113.1": [
{"ts": "2026-03-01T10:00:00Z", "ua": "Mozilla/5.0"}
]
}
}
Was this page helpful?