Accept OAuth2 Consent Request
PUT
/appid-{appId}/recipe/oauth/auth/requests/consent/acceptAuthorization
api-keyAPI key · headerrequiredThe core service API token. If you are using a self-hosted core service and you have not generated a token, you can omit the header.
Query parameters
consentChallengestringrequiredHeader parameters
cdi-versionstringX.Y of the X.Y.Z CDI version.
Request body
application/jsoncontextobjectgrantAccessTokenAudiencestring[]grantScopestring[]handledAtstring<date-time>rememberbooleanrememberForintegersessionobjectShow propertiesHide properties
accessTokenobjectidTokenobjectResponses
200OAuth2 Consent Request Result
One of:
object
statusstatusOKAllowed:
OKredirectTostringoauthError
statusstringrequiredAllowed:
OAUTH_ERRORerrorstringrequirederrorDescriptionstringrequiredstatusCodeintegerrequired400error code 400
string401error code 401
string402error code 402
string404error code 404
string500error code 500
stringTry it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PUT "/appid-{appId}/recipe/oauth/auth/requests/consent/accept?consentChallenge=1234567890" \
-H "api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"context": {},
"grantAccessTokenAudience": [
"string"
],
"grantScope": [
"string"
],
"handledAt": "2019-08-24T14:15:22Z",
"remember": true,
"rememberFor": 0,
"session": {
"accessToken": {},
"idToken": {}
}
}'const response = await fetch("/appid-{appId}/recipe/oauth/auth/requests/consent/accept?consentChallenge=1234567890", {
method: "PUT",
headers: {
"api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"context": {},
"grantAccessTokenAudience": [
"string"
],
"grantScope": [
"string"
],
"handledAt": "2019-08-24T14:15:22Z",
"remember": true,
"rememberFor": 0,
"session": {
"accessToken": {},
"idToken": {}
}
})
});import requests
response = requests.put(
"/appid-{appId}/recipe/oauth/auth/requests/consent/accept?consentChallenge=1234567890",
headers={
"api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"context": {},
"grantAccessTokenAudience": [
"string"
],
"grantScope": [
"string"
],
"handledAt": "2019-08-24T14:15:22Z",
"remember": True,
"rememberFor": 0,
"session": {
"accessToken": {},
"idToken": {}
}
},
)Response
{
"status": "OK",
"redirectTo": "{apiDomain}/oauth/consent?..."
}"string""Invalid API key""License Error""Not Found""Internal Error"