Skip to content
Skip to Content
Coder Docs

OAuth2 authorization request (GET - show authorization page).

GET
/oauth2/authorize

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Query Parameters

client_id*string

Client ID

state?string

A random unguessable string, echoed back on the callback

response_type*"code"

Response type

Value in"code"
redirect_uri?string

Redirect here after authorization

scope?string

Space-separated scopes to request. Each must be supported by this deployment, and the app's allowlist, when it has one, must cover the permissions requested rather than name each scope. Defaults to that allowlist, or to coder:all for an app with no allowlist

code_challenge*string

PKCE code challenge, 43 to 128 characters from [A-Za-z0-9-._~] (RFC 7636)

code_challenge_method?"S256"

PKCE challenge method. S256 only; omitting it means S256

Value in"S256"
resource?string

RFC 8707 resource indicator: an absolute URI without a fragment

Response Body

Returns HTML authorization page

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X GET \	"$CODER_URL/oauth2/authorize?client_id={client_id}&response_type={response_type}&code_challenge={code_challenge}" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN"
Example Response
Empty