Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview

Get the current account

Returns who the credential is. An account sees its organisations and its role in each.

GET/_luna/auth/me
Authorization
AuthorizationBearer token · headerrequired

An account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.

Responses
200

Who the credential is.

tokenMeToken | null
Show properties
One of:
MeToken
idstringrequired
namestringrequired
scopesstring[]required

The permissions the key holds.

null
null
accountMeAccount | null
Show properties
One of:
MeAccount
idstringrequired
emailstringrequired
namestringrequired
operatorbooleanrequired

Whether the account is an operator of this deployment.

null
null
orgsMeOrg[] | null

The organisations the account is a member of.

Show properties
Array of MeOrg
slugstringrequired
namestringrequired
rolestring | null

The account's role in the organisation.

planstring | null

The title of the organisation's plan.

keyMeKey | null
Show properties
One of:
MeKey
namestringrequired
accessstringrequired

read or write.

null
null
default

The request failed. The status says how and error.message says why.

errorErrorDetailrequired
Show properties
codestring | null

A code for programs to branch on, when the error has one.

messagestringrequired

What went wrong, in a sentence a person can read.

Try it
Server
Authorization
Request
curl -X GET 'https://luna.example.com/_luna/auth/me' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "token": {
    "id": "string",
    "name": "string",
    "scopes": [
      "string"
    ]
  },
  "account": {
    "id": "string",
    "email": "string",
    "name": "string",
    "operator": true
  },
  "orgs": [
    {
      "slug": "string",
      "name": "string",
      "role": "string",
      "plan": "string"
    }
  ],
  "key": {
    "name": "string",
    "access": "string"
  }
}

Was this page helpful?