Herald
OpenapiOauth

Record the user's approve/deny decision for a pending third-party authorize transaction and consume its one-time state.

Approve mints the authorization code (identical state-validation and code-record semantics to the login entrances) and returns the redirect URL carrying `code` + `state`; deny returns the redirect URL carrying `error=access_denied` + `state` (RFC 6749 §4.1.2.1).

POST
/api/oauth/{realmId}/consent

Approve mints the authorization code (identical state-validation and code-record semantics to the login entrances) and returns the redirect URL carrying code + state; deny returns the redirect URL carrying error=access_denied + state (RFC 6749 §4.1.2.1).

Path Parameters

realmId*string

Realm ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

approved*boolean
oauth_client_id*string
redirect_uri*string
state*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/oauth/string/consent" \  -H "Content-Type: application/json" \  -d '{    "approved": true,    "oauth_client_id": "string",    "redirect_uri": "string",    "state": "string"  }'
{  "agreements": [    {      "agreement_type": "string",      "effective_at": "2019-08-24T14:15:22Z",      "external_url": "string",      "mode": "full_text",      "summary": "string",      "title": "string",      "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",      "version_no": 0    }  ],  "redirect_to": "string",  "status": "string"}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}