A
Agent Portal

API & Developer Documentation

Programmatic guides for using the Agent Portal's headless Machine and Agent-Driven APIs.

Authentication Overview

How to authenticate your SDKs and programmatic machine scripts.

The interactive web UI uses NextAuth session cookies. However, for programmatic machine-to-machine APIs (like the SDKs and CLI), you must use a Personal Access Token (PAT) encoded as a Bearer string. New tokens start with the dv_ prefix and can be managed from the Integrations > API Keys tab directly within your Publisher Dashboard.

Authorization: Bearer dv_<YOUR_API_TOKEN>

Shared Primary Identity (Single Sign-On)

The Agent Portal acts as your ecosystem's Primary Identity Provider. When developers authenticate natively via GitHub or GitLab SSO in the dashboard, the Agent Portal automatically brokers and syncs that OAuth authorization context into your downstream connected Nango (or similar SaaS orchestration) instances. This eliminates fragmented "double logins" across the portal and your execution layers, unifying identity seamlessly.

SDK Initialization

Provide the token to the Registry Client during instantiation to automatically append it to all requests:

const client = new RegistryClient({
  apiToken: 'pat_1234567890',
  baseUrl: 'https://portal.claw.run'
});