Skip to main content
GET
/
user
Get current user
curl --request GET \
  --url https://api.planetscale.com/v1/user \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "display_name": "<string>",
  "name": "<string>",
  "email": "<string>",
  "avatar_url": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "two_factor_auth_configured": true,
  "default_organization": {
    "id": "<string>",
    "name": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "deleted_at": "<string>"
  },
  "sso": true,
  "managed": true,
  "directory_managed": true,
  "email_verified": true
}

Documentation Index

Fetch the complete documentation index at: https://planetscale.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Response

Returns the user associated with this service token

id
string
required

The ID of the user

display_name
string
required

The display name of the user

name
string
required

The name of the user

email
string
required

The email of the user

avatar_url
string
required

The URL source of the user's avatar

created_at
string
required

When the user was created

updated_at
string
required

When the user was last updated

two_factor_auth_configured
boolean
required

Whether or not the user has configured two factor authentication

default_organization
object
sso
boolean | null

Whether or not the user is managed by SSO.

managed
boolean | null

Whether or not the user is managed by an authentication provider.

directory_managed
boolean | null

Whether or not the user is managed by a SSO directory.

email_verified
boolean | null

Whether or not the user is verified by email.