Skip to content
Hightop docs header art
Hightop
API and Integrations

Authentication#

Agent API v1 supports two authentication paths:

  • Header-key auth for first-party and backend callers that already hold an agent API key.
  • OAuth Bearer auth for third-party clients that receive delegated access from a Hightop user.

Both paths resolve to one Hightop agent and one wallet. The underlying agent capability still controls what can execute.

Header-Key Auth#

Send both headers:

textexample
x-agent-id: <agent uuid>
x-api-key: <agent api key>

For most mutating requests, also send:

textexample
Idempotency-Key: <unique key for this logical mutation>

API keys are shown once when generated or rotated. Store them in your backend secret manager and rotate if exposed.

OAuth Bearer Auth#

Third-party clients authenticate with an OAuth access token:

textexample
Authorization: Bearer <jwt>

For most mutating requests, also send Idempotency-Key.

OAuth tokens are audience-bound. A token issued for https://api.hightop.com/v1/agent cannot be used at https://api.hightop.com/mcp, and vice versa.

Which Auth Should I Use?#

CallerRecommended authWhy
Your backend service calling for your own agentsHeader-key authSimple server-to-server integration with a key you control
First-party operational workflow inside your stackHeader-key authBest fit when no external user consent flow is needed
Third-party client acting after user approvalOAuth Bearer authUser grants specific scopes to a registered client
MCP client such as Claude DesktopOAuth Bearer authThe connector flow obtains a token bound to /mcp

Auth Errors#

Authentication errors use the standard error envelope.

error responseapplication/json
{
  "ok": false,
  "error": {
    "code": "authentication_failed",
    "message": "Authentication failed."
  }
}

Header-key auth error codes:

CodeWhen it is returned
authentication_failedMissing credentials, unknown agent id, API-key mismatch, missing owner, or soft-deleted owner
agent_disabledThe API key matched, but the agent is disabled
agent_not_yet_activeThe API key matched, but the activation window has not started
agent_expiredThe API key matched, but the activation window has expired

OAuth adds invalid_token and insufficient_scope. See Errors and OAuth.

Two-Layer Authorization#

OAuth scope is only the outer layer. For Bearer-authenticated requests:

  1. The token must include the route's required OAuth scope.
  2. The underlying Hightop agent must still have the relevant capability, permission, asset, destination, and limit allowance.

A token with agent:withdrawals:write cannot withdraw if the selected agent is not allowed to withdraw.

Previous

Quickstart

Next

OAuth