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.
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"
}
]
}Login with credentials
Authenticate with username/email and password. Returns access token, refresh token, and ID token on success. Uses Zitadel's V2 Session API.
Logout and revoke tokens
Revoke access and/or refresh tokens. Returns an end session URL if available for completing logout at the identity provider.

