Skip to content

Read the current Direct Auth managed browser session.

GET
/api/v1/auth/direct/session
Code sample: Shell / cURL
curl --request GET \
--url https://auth.example.com/api/v1/auth/direct/session

Returns the current managed browser session and user profile when a valid Direct Auth session cookie or bearer session id is present.

Current Direct Auth managed browser session.

Media type application/json
object
session
required
object
id
required
string
userId
required
string
createdAt
required
integer
expiresAt
required
integer
data
object
key
additional properties
user
required
object
id
required
string
email
string | null format: email
name
string | null
emailVerified
required
boolean
createdAt
integer
updatedAt
integer
lastLoginAt
integer | null
Example
{
"session": {
"id": "g1:apac:3:sess_123",
"userId": "user_123",
"createdAt": 1770000000000,
"expiresAt": 1770086400000
},
"user": {
"id": "user_123",
"email": "[email protected]",
"name": "Example User",
"emailVerified": true,
"createdAt": 1770000000000,
"updatedAt": 1770000000000,
"lastLoginAt": 1770000000000
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}