Skip to main content
GET
https://example.com
/
api
/
users
/
{userId}
Get user
curl --request GET \
  --url https://example.com/api/users/{userId} \
  --cookie better-auth.session_token=
{
  "createdAt": "<unknown>",
  "email": "<string>",
  "hasCredentialAccount": true,
  "id": "<string>",
  "inviteExpiresAt": null,
  "inviteUrl": "<string>",
  "lastActive": null,
  "name": "<string>"
}

Authorizations

better-auth.session_token
string
cookie
required

Path Parameters

userId
string
required
Minimum string length: 1

Response

Successful response

createdAt
any
required
email
string
required
hasCredentialAccount
boolean
required
id
string
required
inviteExpiresAt
unknown
required
inviteUrl
string | null
required
lastActive
unknown
required
name
string
required
role
enum<string> | null
required
Available options:
admin,
user
status
enum<string>
required
Available options:
active,
pending,
expired