v50

latestSwagger 2.0MITraw.githubusercontent.com2026-07-15422691.7 KB
oidc

Initiate the OIDC authorization flow for a native app.

The app generates a PKCE code_verifier and code_challenge, then calls this endpoint. The server forwards the code_challenge to the OIDC provider and returns the authorization URL for the app to open in a browser.

post/auth/oidc/external/authorize

Request body

code_challengestring required

The PKCE code challenge (S256).

namestring required

The client name to display in gotify.

redirect_uristring required

The app's redirect URI.

Example request

{
  "code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",
  "name": "Android Phone",
  "redirect_uri": "gotify://oidc/callback"
}

Response

Ok

authorize_urlstring required

The URL to open in the browser to authenticate with the OIDC provider.

statestring required

The state parameter to send back with the token exchange request.

Example response

{
  "authorize_url": "https://auth.example.com/authorize?client_id=gotify&...",
  "state": "Android Phone:a1b2c3d4e5f6"
}