AgentOnboard Docs
CLI Reference

aon token get

Exchange a saved API key for a 5-minute session token with aon token get

aon token get

Exchange one of your saved API keys for a short-lived session token. The session token is what your agents send to partner APIs instead of your static key — it is valid for 5 minutes.

Usage

aon token get [label]

The label is optional. When omitted, the CLI uses the latest saved key.

aon token get:

  • Uses the chosen saved key
  • Prints the session token to stdout on success
  • Prints an error to stderr and exits non-zero on failure

Examples

Use the latest saved key:

aon token get

Use a specific key by label:

aon token get production

The label must match exactly

The label must match one you set with aon save. aon token get production will not match a key saved as Key #1.

Failure modes

ConditionWhat happens
No key saved yetNon-zero exit, error message
Label does not match a saved keyNon-zero exit, error message
API rejects the keyNon-zero exit, error message
Network/API failureNon-zero exit, error message

Next steps

On this page