POST /v1/console/oauth/github/start
| Call | POST /v1/console/oauth/github/start |
| Price | free |
| Scope | none (public endpoint) |
| Operation id | startGithubOauth |
What it does
Section titled “What it does”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.
Example request
Section titled “Example request”Copy it as curl. Set VERDICT_API_KEY first; uuidgen makes a fresh Idempotency-Key.
curl -X POST 'https://api.askverdict.io/v1/console/oauth/github/start' \ -H "Idempotency-Key: $(uuidgen)"Example response
Section titled “Example response”200: Send the browser to authorize_url.
{ "authorize_url": "https://github.com/login/oauth/authorize?client_id=Iv1.example&state=example", "expires_at": "2026-11-07T14:10:00Z"}Parameters
Section titled “Parameters”| 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. |
Response fields (200)
Section titled “Response fields (200)”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
Section titled “Errors”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. |
Try it
Section titled “Try it”Open the interactive reference to send this request from the browser. The full document is at /openapi.json.