List the signed-in person’s open sessions
const url = 'https://api.emite.cr/v1/auth/sessions';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.emite.cr/v1/auth/sessionsBrowser and system are derived from the user agent; ip is the address of the latest use. The session of this request is marked current.
Responses
Section titled “Responses”The open sessions of the person, this one first.
object
The sessions a token can still use: this one first, then by most recent use. A person keeps at most 20; a sign-in past that closes the least recently used.
object
Id of the session: what DELETE /v1/auth/sessions/{id} closes.
true for the session of this request, listed first. It is not closed from the list: sign out instead (POST /v1/auth/logout).
Browser, derived from the user agent when listing: Chrome, Edge, Firefox, Safari, Opera or Samsung Internet; null when it cannot be told.
Operating system, derived from the user agent when listing: Windows, macOS, iOS, iPadOS, Android, ChromeOS or Linux; null when it cannot be told.
IP address the session was last used from; null when unknown.
When the session was last used. Updated at most every 5 minutes.
When the person signed in to open it.
How the person signed in: password alone; the second factor after it (totp, email_otp or recovery_code); verifying a new account (signup); resetting the password (password_reset); accepting an invitation (invitation); or starting a demo (demo).
When it ends at the latest: its maximum, counted from the sign-in. It can end earlier — signed out, closed, or under a company inactivity rule.
Example
{ "sessions": [ { "browser": "Chrome", "os": "Windows", "ip": "201.192.10.4", "via": "password" } ]}