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

List app keys

Returns the credentials an app’s callers use to reach a tenant: its publishable keys, which are safe to ship in a client, and its secret tokens, which are not shown. A tenant is born with one of each, with the ids primary and primary-secret.

GET/_luna/tenants/{tenant}/keys
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.

Scopes:keys:read
Path parameters
tenantstringrequired

The tenant, by its full name.

Responses
200

The tenant's keys.

keysAppKeyItem[]required

The tenant's keys, the two main credentials first.

Show properties
Array of AppKeyItem
idstringrequired

The key's id. primary is the main publishable key and primary-secret the main secret token.

kindstringrequired

publishable or secret.

keystring | null

The key itself, for a publishable key. A secret token is never shown again, so this is null or left out.

namestringrequired
originsstring[] | null

The origins a browser can use the key from. Empty means any origin. Left out for the main secret token.

ratePerSecondnumber<double> | null

The most requests a second the key can make. Null when it has no limit of its own. Left out for the main secret token.

typesstring[] | null

The luna types the key can call. Empty sets no such limit. Left out for the main secret token.

expiresMsinteger<int64> | null

When the key stops working, in milliseconds since the Unix epoch. 0 means it does not expire. Left out for the two main credentials.

min 0
createdMsinteger<int64> | null

When the key was made, in milliseconds since the Unix epoch. Left out for the two main credentials.

min 0
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
Parameters
Request
curl -X GET 'https://luna.example.com/_luna/tenants/string/keys' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "keys": [
    {
      "id": "string",
      "kind": "string",
      "key": "string",
      "name": "string",
      "origins": [
        "string"
      ],
      "ratePerSecond": 0,
      "types": [
        "string"
      ],
      "expiresMs": 0,
      "createdMs": 0
    }
  ]
}

Was this page helpful?