Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Authorize an application

GET
/api/auth/oauth2/authorize
curl --request GET \
--url 'http://localhost:3000/api/auth/oauth2/authorize?client_id=example'

Starts an authorization-code flow with PKCE, household selection and consent.

response_type
string

OAuth 2.1 response type (e.g., ‘code’)

client_id
required
string

OAuth 2.1 client ID

redirect_uri
string format: uri

OAuth 2.1 redirect URI

scope
string

OAuth 2.1 scopes (space-separated)

state
string

OAuth 2.1 state parameter

request_uri
string

Pushed Authorization Request URI referencing stored parameters

code_challenge
string

PKCE code challenge

code_challenge_method
string

PKCE code challenge method

nonce
string

OpenID Connect nonce

max_age
integer

Maximum authentication age in seconds; forces re-authentication when exceeded

resource
Array<string>

Requested protected resource(s) for the access token. May be supplied multiple times as repeated ‘resource’ query parameters (RFC 8707) or as an array of strings.

prompt
string

OAuth2 prompt parameter

Redirect to client with code or error

Location
string format: uri

Redirect URI with code or error

Invalid request

Media typeapplication/json
object
error
required
string
error_description
string
state
string

Example generated

{
"error": "example",
"error_description": "example",
"state": "example"
}

Unauthorized. Due to missing or invalid authentication.

Media typeapplication/json
object
message
required
string

Example generated

{
"message": "example"
}

Forbidden. You do not have permission to access this resource or to perform this action.

Media typeapplication/json
object
message
string

Example generated

{
"message": "example"
}

Not Found. The requested resource was not found.

Media typeapplication/json
object
message
string

Example generated

{
"message": "example"
}

Too Many Requests. You have exceeded the rate limit. Try again later.

Media typeapplication/json
object
message
string

Example generated

{
"message": "example"
}

Internal Server Error. This is a problem with the server that you cannot fix.

Media typeapplication/json
object
message
string

Example generated

{
"message": "example"
}

© 2026 Kyle Johnson. Documentation: CC BY 4.0. Merran: AGPL-3.0-or-later.