Skip to main content
GET
/
v1
/
auth
/
session
Get current session
const options = {method: 'GET'};

fetch('http://localhost:8000/v1/auth/session', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "data": {
    "session": {
      "token": "<string>",
      "expiresAt": "2023-11-07T05:31:56Z"
    },
    "user": {
      "id": "<string>",
      "email": "jsmith@example.com",
      "name": "<string>",
      "image": "<string>",
      "emailVerified": true,
      "createdAt": "2023-11-07T05:31:56Z",
      "role": "<string>"
    },
    "currentOrganization": {
      "id": "<string>",
      "name": "<string>",
      "slug": "<string>",
      "logo": "<string>",
      "metadata": {},
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    },
    "organizationMemberships": [
      {
        "organizationId": "<string>",
        "organizationName": "<string>",
        "organizationSlug": "<string>",
        "role": "owner"
      }
    ]
  },
  "meta": {
    "requestId": "<string>",
    "timestamp": "<string>"
  }
}

Response

Current session data

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required