Skip to main content

Access Tokens

Submitting requests to the Onehouse API requires an access token, which can be generated with a service principal.

Follow these docs to create a service principal and generate a token.

Token lifetime

Access tokens have a bounded lifetime. There is currently no mechanism to issue a long-lived API key (e.g., for indefinite CI use). For long-lived automation:

  • Use a service principal rather than personal user credentials.
  • Rotate the service principal's tokens on a schedule — for example, regenerate the token monthly via the CREATE API TOKEN API and roll out the new value through your secret manager.
  • For Terraform provider registry tokens, the rotation cadence is fixed; coordinate with your CI to refresh the token before its expiry.

When a token expires, API calls return an authentication error; refresh the token from the service principal's Tokens tab and retry.

See also