Skip to main content
GET
/
v1
/
oauth
/
authorize
OAuth authorization endpoint
curl --request GET \
  --url https://api.hq.zone/v1/oauth/authorize

Browser redirect endpoint (OAuth 2.1)

The start of the authorization-code + PKCE flow. This is a front-channel, browser-redirect endpoint — open it in the user’s browser, don’t call it from a server. HQ authenticates the user (via their hq-session cookie), then 302-redirects back to your registered redirect_uri with a single-use code. Standard query parameters apply: response_type=code, client_id, redirect_uri, scope, state, code_challenge, and code_challenge_method=S256. The granted scope is what you request intersected with the client’s allowed scopes, and never exceeds the user’s own role. Exchange the returned code at the token endpoint. Register a client first via Register an OAuth client, or use a first-party client.

Query Parameters

client_id
string
required
redirect_uri
string
required
code_challenge
string
required
code_challenge_method
string | null
state
string | null
scope
string | null

Response

Redirect to the client's redirect_uri with ?code=&state= (third-party clients hit the consent screen first)