Prisma

Initiate OAuth login

Initiate OIDC authorization code flow with PKCE. Returns an authorization URL to redirect the user to Zitadel's hosted login UI. Use this for OAuth/SSO integrations or when Zitadel's UI is preferred.

POST
/api/v1/auth/login/oauth

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X post "http://localhost:8000/api/v1/auth/login/oauth" \  -H "Content-Type: application/json" \  -d '{    "redirect_uri": "https://app.example.com/callback",    "scope": "openid profile email",    "state": "xyzSecureRandom123"  }'
{
  "authorization_url": "string",
  "state": "string",
  "code_verifier": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}