Skip to content

POST /v1/console/oauth/github/start

Call POST /v1/console/oauth/github/start
Price free
Scope none (public endpoint)
Operation id startGithubOauth

Begin console sign-in with GitHub. Returns GitHub’s authorization URL with a single-use state (valid 10 minutes) and sets a short-lived httpOnly cookie that binds the state to this browser. GitHub redirects back to the console, which posts code and state to POST /v1/console/oauth/github/callback. No key or session needed.

Copy it as curl. Set VERDICT_API_KEY first; uuidgen makes a fresh Idempotency-Key.

Request
curl -X POST 'https://api.askverdict.io/v1/console/oauth/github/start' \
-H "Idempotency-Key: $(uuidgen)"

200: Send the browser to authorize_url.

200 response
{
"authorize_url": "https://github.com/login/oauth/authorize?client_id=Iv1.example&state=example",
"expires_at": "2026-11-07T14:10:00Z"
}
Name In Type Required Description
idempotency-key header string (uuid) yes A UUID you generate per logical request. Required on every POST. Repeating it within 24 hours returns the stored response and bills nothing; reusing it with a different body returns 409 idempotency_conflict.

Schema GithubOauthStartResponse.

Field Type Required Description
authorize_url string (uri) yes GitHub’s authorization page; send the browser there.
expires_at string (date-time) yes When the OAuth state in the URL expires.

Errors are RFC 9457 problem details and are never billed. Branch on type. See Errors.

Status Meaning
400 Invalid request: malformed JSON, an unknown field, a failed constraint or a size limit (invalid_request).
401 Missing, malformed, revoked or expired API key, or a bad webhook signature (unauthorized).
429 Rate limited (rate_limited). Wait Retry-After seconds.
500 Unexpected server error (internal). Not billed; retry with the same Idempotency-Key.

Open the interactive reference to send this request from the browser. The full document is at /openapi.json.