Synced from Hive. This page is pulled from hivecommons/hive@v5 during the docs build. Edit the canonical source in the Hive repository.

Dashboard REST API reference — Auth and external accounts

Part of the Dashboard REST API reference; see that page for how auth levels and pkg/<file>:<line> source citations are read and checked. Edit this file for routes in this area and run src/scripts/check-api-reference-citations.sh --fix to resync citations.

MethodPathAuthPurposeSource
GET/api/gh-authDashboard auth/sessionGitHub Authpkg/dashboard/api.go:180
GET/api/gh-rate-limitsDashboard auth/sessionGitHub Rate Limitspkg/dashboard/api.go:181
GET/api/gh-user-auth/statusPublicGitHub User Auth Statuspkg/dashboard/api.go:182
POST/api/gh-user-auth/startPublicGitHub User Auth Startpkg/dashboard/api.go:183
POST/api/gh-user-auth/pollPublicGitHub User Auth Pollpkg/dashboard/api.go:184
POST/api/gh-user-auth/logoutPublicGitHub User Auth Logoutpkg/dashboard/api.go:185
GET/api/gh-user-auth/sessionPublicGitHub User Auth Sessionpkg/dashboard/api.go:186
GET/api/claude-auth/statusDashboard auth/sessionClaude Auth Statuspkg/dashboard/claude_auth.go:54
POST/api/claude-auth/startDashboard auth/sessionClaude Auth Startpkg/dashboard/claude_auth.go:55
POST/api/claude-auth/exchangeDashboard auth/sessionClaude Auth Exchangepkg/dashboard/claude_auth.go:56
POST/api/claude-auth/logoutDashboard auth/sessionClaude Auth Logoutpkg/dashboard/claude_auth.go:57
GET/api/copilot-auth/statusDashboard auth/sessionCopilot Auth Statuspkg/dashboard/copilot_auth.go:85
POST/api/copilot-auth/startOwner onlyCopilot Auth Startpkg/dashboard/copilot_auth.go:86
POST/api/copilot-auth/logoutOwner onlyCopilot Auth Logoutpkg/dashboard/copilot_auth.go:88
GET/api/openrouter/connect/startDashboard auth/sessionOpen Router Startpkg/dashboard/openrouter.go:45
GET/api/openrouter/qrDashboard auth/sessionOpen Router QRpkg/dashboard/openrouter.go:46
GET/api/openrouter/modelsDashboard auth/sessionOpen Router Modelspkg/dashboard/openrouter.go:47
GET/api/openrouter/creditDashboard auth/sessionOpen Router Creditpkg/dashboard/openrouter.go:48
GET/openrouter/callbackPublicOpen Router Callbackpkg/dashboard/openrouter.go:49
POST/api/github-app/recheckDashboard auth/sessionGitHub App Recheckpkg/dashboard/server.go:1765
POST/api/github-app/install-clickedDashboard auth/sessionGitHub App Install Clickedpkg/dashboard/server.go:1766
GET/gh-setupPublicGitHub App Setup Callbackpkg/dashboard/server.go:1767
GET/api/github-owner-identityOwner onlyThe hive owner’s GitHub identity for remote repos (#18197): connected, login, scope, connected_at, usable, reason, verified_at, scope_required (public_repo), private_repos_supported (false) and file (the token file path on the spoke). Never the tokenpkg/dashboard/api.go:567
POST/api/github-owner-identity/startOwner onlyStart the consent: a GitHub device flow with the spoke’s oauth_client_id asking for public_repo, separate from the scope-free login flow. Returns user_code, verification_uri, expires_in, interval, scope and the flow_id the poll must present. 502 when GitHub refused the device-code requestpkg/dashboard/api.go:568
POST/api/github-owner-identity/pollOwner onlyPoll the consent with {"flow_id"}: status pending / slow_down (poll again), complete (with login and the identity) or error. On completion the granted scope must cover public_repo, the token must validate and the account must be the logged-in owner’s; the identity is then stored on the spoke (/data/secrets/github-owner-token, HIVE_GITHUB_OWNER_TOKEN_FILE overrides) and the reference-repo policies re-resolve. 400 without a live flow or with the wrong flow_id; audited as github_owner_identity_connected / _rejectedpkg/dashboard/api.go:569
DELETE/api/github-owner-identityOwner onlyDisconnect: removes the token file, drops every write-tier reference repo to read-only on the next pass, returns the previous login and a note that GitHub-side revocation is done under Settings → Applications on github.com; audited as github_owner_identity_disconnectedpkg/dashboard/api.go:570