---
title: "Initiate the OIDC authorization flow for a native app."
method: POST
path: "/auth/oidc/external/authorize"
tags: ["oidc"]
---

# Initiate the OIDC authorization flow for a native app.

`POST /auth/oidc/external/authorize`

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.

## Request body

- OIDCExternalAuthorizeRequest — Used to initiate the OIDC authorization flow for an external client.
  - `code_challenge` string, required — The PKCE code challenge (S256).
  - `name` string, required — The client name to display in gotify.
  - `redirect_uri` string, required — The app's redirect URI.

## Response `200`

Ok

- OIDCExternalAuthorizeResponse — Returned after initiating the OIDC authorization flow.
  - `authorize_url` string, required — The URL to open in the browser to authenticate with the OIDC provider.
  - `state` string, required — The state parameter to send back with the token exchange request.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/gotify/apis/gotify-rest-api.md) · [All operations](https://skmtc.net/gotify/apis/gotify-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gotify/gotify-rest-api/revisions/7b32fcdb1345/schema)
