Create a token

  • Open API tokens in the 1sc dashboard.
  • Under Create token, choose the token settings.
  • Click Create token.
  • In Setup, click Copy env and paste the exported variables into the terminal session that will use the token.
FieldRequiredDefault / optionsPurpose
LabelRequiredAny label that identifies the script or agentHelps you recognize the token before revoking it.
AccessRequiredRead only for monitoring; Operator for deployments and attach actionsControls which API actions the token can perform.
ExpirationRequired1 day, 7 days, 30 days, or Never, revoke manuallyLimits token lifetime.

Make your first request

terminal
curl --fail-with-body "$ONE_SC_API_URL/api/v1/deployments" \
  --header "Authorization: Bearer $ONE_SC_API_TOKEN"

A successful request returns your deployments. A missing, expired, revoked, or insufficiently scoped token returns an error with a stable code and descriptive message.

Scope bundles

BundleScopes
Read onlydeployments:read, deployments:logs
Operatordeployments:read, deployments:create, deployments:logs, deployments:stop, deployments:resume, radio-attach:run
TUIdeployments:read, deployments:create, deployments:logs, deployments:stop, deployments:resume, radio-attach:run

Revoke a token

  • Open API tokens in the 1sc dashboard.
  • Find the token under Active tokens.
  • Confirm the label, scopes, expiration, and last-used date identify the token you want to remove.
  • Click Revoke.

Use Read only for monitoring. Grant Operator only when automation must create, stop, or resume deployments or run attach validation. Revoke tokens when the automation is retired or the token may have been exposed.