Skip to main content
POST
Make a one-use connect token
Takes a managing key (oc_key_...) or a signed-in session. See the Quickstart for the connect command these tokens go into. Makes a connect token that connects one agent to this vault and then stops, and returns it once. It also stops by itself after expiresInMinutes. The vault’s standing connect token is not changed. Give the token to the place the new agent runs in: the agent’s own access is made there.
Availability: OneCLI Cloud and self-hosted.

Authorizations

Authorization
string
header
required

A managing key (oc_key_...), an older API key (oc_...), or a signed-in session.

Headers

Idempotency-Key
string

Not accepted on this call. Sending it is 400 bad_request.

Required string length: 1 - 255

Path Parameters

id
string
required

The vault's id.

Required string length: 1 - 64

Body

application/json
expiresInMinutes
integer
default:15

How long the token works. 1 to 60. Default: 15.

Required range: 1 <= x <= 60
name
string

The name the agent gets, 1 to 64 characters. It wins over a name the connecting place sends. Unset: that place names the agent.

Required string length: 1 - 64
Pattern: ^[^\p{Cc}]+$/u
provider
string

The provider the agent gets: a short lowercase label that never decides access. It wins over one the connecting place sends.

Pattern: ^[a-z0-9][a-z0-9._-]{0,31}$
Example:

"boat"

Response

The new token, with the token itself shown once.

createdAt
string
required

ISO 8601.

expiresAt
string
required

ISO 8601. When the token stops by itself.

id
string
required

The token's id. Use it to turn the token off.

name
string | null
required

The name the agent gets. null: the connecting place names it.

provider
string | null
required

The provider the agent gets: a short lowercase label. null: the connecting place may send one.

Example:

"boat"

vaultId
string
required
connectToken
string
required

The connect token itself (oc_connect_...). Shown here once. It connects one agent and then stops.

Example:

"oc_connect_exampleexampl_example"