Gamma API
AccountSessions

Get my session

GET
/api/account/session

The signed-in user and the session (or access token) making the request. Never a token.

Who may call it: Any signed-in user, for their own account. API keys: no.

Authorization

session
cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Host- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Response Body

OK.

application/json
  1. response

Who the caller is, as better-auth's session check answers it, without the session's token.

user*
session*
Example Request
curl -X GET 'http://localhost:3000/api/account/session'
Example Response
{  "user": {    "id": "string",    "name": "string",    "email": "string",    "emailVerified": true,    "image": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "role": "string",    "banned": true,    "banReason": "string",    "banExpires": "2019-08-24T14:15:22Z",    "twoFactorEnabled": true,    "userTag": "string",    "language": "string",    "chartPalette": "string"  },  "session": {    "id": "string",    "userId": "string",    "expiresAt": "2019-08-24T14:15:22Z",    "ssoDomain": "string"  }}