Get the current credential
GET
Describes the credential making this call. Readable by the same callers
as GET /v1/account/balance.
- API key (
kind: api_key): its name, scopes, the avatar it is restricted to, its session caps and how much of its spend cap the current window used. The secret is never returned. A key has no billing mode: every billed session is charged as it runs, within the key's spend cap, session length and concurrency limits.spendCap.enforcedis false when the cap is not applied;limitMicrocreditsandremainingMicrocreditsare absent when the key has no cap, andwindowResetsAtfor a lifetime cap (window: total). - Signed-in user (
kind: user): the user and the account it acts for. A user has no key, no scopes beyond the avatar ones and no spend cap.
header
X-Api-Key<token>Your secret API key (sk_atmee_...; older keys start sk_live_),
sent as X-Api-Key. Keep it on your server and never send it to a
browser.
The caller.
application/json- response
kind: api_key carries every field but userId; kind: user carries
only kind, userId and accountId.
kind*stringValue in
"api_key""user"accountId*stringuserId?stringOnly for kind user.
id?stringThe key's id (kind api_key).
name?stringscopes?array<string>avatarId?stringThe one avatar an avatar-scoped key may use; absent for an account-wide key.
active?booleanspendCap?maxSessionSeconds?integerThe key's own cap on a session's length; absent = the plan's.
maxConcurrentSessions?integerThe key's own cap on sessions at once; absent = the plan's.
curl -X GET 'https://api.atmanity.us/v1/api_keys/current'Example Response
{ "kind": "api_key", "accountId": "string", "userId": "string", "id": "string", "name": "string", "scopes": [ "string" ], "avatarId": "string", "active": true, "spendCap": { "limitMicrocredits": 0, "window": "string", "spentMicrocredits": 0, "remainingMicrocredits": 0, "windowResetsAt": "2019-08-24T14:15:22Z", "enforced": true }, "maxSessionSeconds": 0, "maxConcurrentSessions": 0}
