Finalize an Auth Request and get the callback URL.
Finalize an Auth Request and get the callback URL for success or failure. The user must be redirected to the URL in order to inform the application about the success or failure. On success, the URL contains details for the application to obtain the tokens. This method can only be called once for an Auth request.
Path Parameters
Set this field when the authorization flow failed. It creates a callback URL to the application, with the error details set.
Request Body required
session object
error object
Request Body required
session object
error object
Request Body required
session object
error object
- 200
- 403
- 404
- default
OK
Schema
details object
Callback URL where the user should be redirected, using a "302 FOUND" status. Contains details for the application to obtain the tokens on success, or error details on failure. Note that this field must be treated as credentials, as the contained code can be used to obtain tokens on behalve of the user.
{
"details": {
"sequence": "2",
"changeDate": "2024-01-15T17:30:58.510Z",
"resourceOwner": "69629023906488334"
},
"callbackUrl": "https://client.example.org/cb?code=SplxlOBeZQQYbYS6WxSbIA&state=af0ifjsldkj"
}
Schema
details object
Callback URL where the user should be redirected, using a "302 FOUND" status. Contains details for the application to obtain the tokens on success, or error details on failure. Note that this field must be treated as credentials, as the contained code can be used to obtain tokens on behalve of the user.
{
"details": {
"sequence": "2",
"changeDate": "2024-01-15T17:30:58.510Z",
"resourceOwner": "69629023906488334"
},
"callbackUrl": "https://client.example.org/cb?code=SplxlOBeZQQYbYS6WxSbIA&state=af0ifjsldkj"
}
Schema
details object
Callback URL where the user should be redirected, using a "302 FOUND" status. Contains details for the application to obtain the tokens on success, or error details on failure. Note that this field must be treated as credentials, as the contained code can be used to obtain tokens on behalve of the user.
{
"details": {
"sequence": "2",
"changeDate": "2024-01-15T17:30:58.510Z",
"resourceOwner": "69629023906488334"
},
"callbackUrl": "https://client.example.org/cb?code=SplxlOBeZQQYbYS6WxSbIA&state=af0ifjsldkj"
}
Returned when the user does not have permission to access the resource.
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Returned when the resource does not exist.
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
POST /v2beta/oidc/auth_requests/:authRequestId
Authorization
name: OAuth2type: oauth2scopes:openid,urn:zitadel:iam:org:project:id:zitadel:aud
flows: { "authorizationCode": { "authorizationUrl": "$CUSTOM-DOMAIN/oauth/v2/authorize", "tokenUrl": "$CUSTOM-DOMAIN/oauth/v2/token", "scopes": { "openid": "openid", "urn:zitadel:iam:org:project:id:zitadel:aud": "urn:zitadel:iam:org:project:id:zitadel:aud" } } }
Request
Request
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/oidc/auth_requests/:authRequestId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"session": {
"sessionId": "163840776835432705",
"sessionToken": "string"
},
"error": {
"error": "ERROR_REASON_UNSPECIFIED",
"errorDescription": "string",
"errorUri": "string"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/oidc/auth_requests/:authRequestId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"session": {
"sessionId": "163840776835432705",
"sessionToken": "string"
},
"error": {
"error": "ERROR_REASON_UNSPECIFIED",
"errorDescription": "string",
"errorUri": "string"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/oidc/auth_requests/:authRequestId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"session": {
"sessionId": "163840776835432705",
"sessionToken": "string"
},
"error": {
"error": "ERROR_REASON_UNSPECIFIED",
"errorDescription": "string",
"errorUri": "string"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/oidc/auth_requests/:authRequestId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"session": {
"sessionId": "163840776835432705",
"sessionToken": "string"
},
"error": {
"error": "ERROR_REASON_UNSPECIFIED",
"errorDescription": "string",
"errorUri": "string"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/oidc/auth_requests/:authRequestId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"session": {
"sessionId": "163840776835432705",
"sessionToken": "string"
},
"error": {
"error": "ERROR_REASON_UNSPECIFIED",
"errorDescription": "string",
"errorUri": "string"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/oidc/auth_requests/:authRequestId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"session": {
"sessionId": "163840776835432705",
"sessionToken": "string"
},
"error": {
"error": "ERROR_REASON_UNSPECIFIED",
"errorDescription": "string",
"errorUri": "string"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/oidc/auth_requests/:authRequestId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"session": {
"sessionId": "163840776835432705",
"sessionToken": "string"
},
"error": {
"error": "ERROR_REASON_UNSPECIFIED",
"errorDescription": "string",
"errorUri": "string"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/oidc/auth_requests/:authRequestId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"session": {
"sessionId": "163840776835432705",
"sessionToken": "string"
},
"error": {
"error": "ERROR_REASON_UNSPECIFIED",
"errorDescription": "string",
"errorUri": "string"
}
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/oidc/auth_requests/:authRequestId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"session": {
"sessionId": "163840776835432705",
"sessionToken": "string"
},
"error": {
"error": "ERROR_REASON_UNSPECIFIED",
"errorDescription": "string",
"errorUri": "string"
}
}'