Merran documentation API & integrations
Authorize an application
const url = 'http://localhost:3000/api/auth/oauth2/authorize?client_id=example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”OAuth 2.1 response type (e.g., ‘code’)
OAuth 2.1 client ID
OAuth 2.1 redirect URI
OAuth 2.1 scopes (space-separated)
OAuth 2.1 state parameter
Pushed Authorization Request URI referencing stored parameters
PKCE code challenge
PKCE code challenge method
OpenID Connect nonce
Maximum authentication age in seconds; forces re-authentication when exceeded
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.
OAuth2 prompt parameter
Responses
Section titled “Responses”Redirect to client with code or error
Headers
Section titled “Headers”Redirect URI with code or error
Invalid request
object
Example generated
{ "error": "example", "error_description": "example", "state": "example"}Unauthorized. Due to missing or invalid authentication.
object
Example generated
{ "message": "example"}Forbidden. You do not have permission to access this resource or to perform this action.
object
Example generated
{ "message": "example"}Not Found. The requested resource was not found.
object
Example generated
{ "message": "example"}Too Many Requests. You have exceeded the rate limit. Try again later.
object
Example generated
{ "message": "example"}Internal Server Error. This is a problem with the server that you cannot fix.
object
Example generated
{ "message": "example"}© 2026 Kyle Johnson. Documentation: CC BY 4.0. Merran: AGPL-3.0-or-later.