Skip to main content
GET
/
oauth
/
authorize
cURL
curl --request GET \
  --url https://api.sandbox.humanity.org/v2/oauth/authorize
SDK equivalent
const { url, codeVerifier } = sdk.buildAuthUrl({
  scopes: ['is_human', 'humanity_user'],
  state: crypto.randomUUID(),
});
Kick off the OAuth 2.1 + PKCE handshake. Build URLs with HumanitySDK.buildAuthUrl or construct them manually with:
  • client_id, redirect_uri, response_type=code
  • scope – space-delimited preset keys (e.g. is_human is_21_plus)
  • code_challenge + code_challenge_method=S256
  • Optional context: state, prompt, nonce, authorization_id, login_hint
Use /oauth/authorize/context to hydrate an authorization prompt (name, avatar, requested presets) and /oauth/authorize/result to resolve the final decision if you are embedding the consent UI.

Query Parameters

client_id
string
required
redirect_uri
string
required
response_type
any
required
scope
string
required
state
string
code_challenge
string
required
code_challenge_method
any
required
authorization_id
string
login_hint
string
locale
string
nonce
string

Response

200 - application/json