Get the current session
curl --request GET \
--url https://aquila.attaxr.com/api/v1/whoami \
--cookie better-auth.session_token=const options = {method: 'GET', headers: {cookie: 'better-auth.session_token='}};
fetch('https://aquila.attaxr.com/api/v1/whoami', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://aquila.attaxr.com/api/v1/whoami"
headers = {"cookie": "better-auth.session_token="}
response = requests.get(url, headers=headers)
print(response.text){
"authenticated": true,
"userId": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"username": "<string>",
"image": "<string>"
},
"session": {
"id": "<string>",
"expiresAt": "<string>"
},
"authMethod": "<string>"
}{
"error": "<string>"
}V1
Get the current session
Reports the authenticated user, session expiry, and auth method.
GET
/
api
/
v1
/
whoami
Get the current session
curl --request GET \
--url https://aquila.attaxr.com/api/v1/whoami \
--cookie better-auth.session_token=const options = {method: 'GET', headers: {cookie: 'better-auth.session_token='}};
fetch('https://aquila.attaxr.com/api/v1/whoami', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://aquila.attaxr.com/api/v1/whoami"
headers = {"cookie": "better-auth.session_token="}
response = requests.get(url, headers=headers)
print(response.text){
"authenticated": true,
"userId": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"username": "<string>",
"image": "<string>"
},
"session": {
"id": "<string>",
"expiresAt": "<string>"
},
"authMethod": "<string>"
}{
"error": "<string>"
}Authorizations
apiKeyCookieapiKeyHeaderbearerAuth
Browser session cookie set by Better Auth sign-in.

