Create Automation Key
Creates an automation key on an application the caller administers, bound to an automation-flagged user, and returns its secret exactly once. The same validation as the portal: the name is unique among the application's live keys, each client must be the application's own, and the expiry is bounded by the platform's lifetime limits.
Required scopes: auth:automation-keys:manage
JWT access token obtained via OAuth2 flow or service account
In: header
Header Parameters
Define the version of the Connect protocol
Define the timeout, in ms
Request Body
application/json
The application's external id.
1 <= length <= 64URN of the user to bind. Must carry the automation flag.
1 <= length <= 128Unique among the application's live keys.
1 <= length <= 64items <= 64Each must be a client the application owns.
items <= 64Optional. Defaults to the platform default lifetime; capped at the platform maximum. validate:skip bounded by the platform's lifetime limits in the handler
date-timeOptional. The resources every token the key mints is limited to (AUTH-446). A key limited to resources mints tokens directly (MintToken and the token endpoint's automation-key grant); it cannot approve device codes or complete authorization requests, whose grants are someone else's request.
items <= 64Response Body
application/json
application/json
curl -X POST "https://auth.xeonr.io/xeonr.auth.api.v1.AutomationKeysService/CreateAutomationKey" \ -H "Connect-Protocol-Version: 1" \ -H "Connect-Timeout-Ms: 1000" \ -H "Content-Type: application/json" \ -d '{}'{
"key": {
"keyId": "urn:xeonr:auth:automation-key:42",
"name": "string",
"keyPrefix": "string",
"applicationId": "string",
"applicationSlug": "string",
"user": {
"userId": "usr_a1b2c3d4e5f6",
"username": "johndoe",
"email": "[email protected]",
"avatarUrl": "https://cdn.example.com/avatars/abc123",
"displayName": "John Doe"
},
"scopes": [
"string"
],
"clientIds": [
"string"
],
"expiresAt": "2023-01-15T01:30:15.01Z",
"lastUsedAt": "2023-01-15T01:30:15.01Z",
"revokedAt": "2023-01-15T01:30:15.01Z",
"createdAt": "2023-01-15T01:30:15.01Z",
"createdBy": "string",
"resources": [
{
"type": "forge:repository",
"identifier": "forge-synthetics/probe",
"actions": [
"string"
]
}
]
},
"secret": "string"
}xeonr.auth.api.v1.AutomationKeysService
AutomationKeysService is how a product creates and manages automation keys on a person's behalf (AUTH-191): Lantern's synthetics create the key a flow mints its tokens from. It is the public face of the portal's ApplicationsService automation-key RPCs and runs the same code. The caller is a person's access token carrying auth:automation-keys:manage, a scope a product's client holds through an approved binding to the auth application. The scope alone authorises nothing: each call is also held to the person's own standing on the named application, exactly as the portal is — an organisation administrator may act on any application except auth's own, anybody else only on applications owned by a team they own (listing needs only membership). Anything the person cannot reach answers NotFound. Service accounts and automation keys cannot call it, and neither can a person whose account is itself automation-flagged: a key must never be a route to another key.
Get Automation Key POST
Returns one automation key of an application the caller can see, revoked or not. The secret is never returned. **Required scopes:** `auth:automation-keys:manage`