Record User OAuth Scope Consent
POST {{apiPath}}/environments/{{envID}}/users/{{userID}}/oauthConsents
The POST /environments/{{envID}}/users/{{userID}}/oauthConsents
operation creates an OAuth scope consent for the specified user. This operation uses the application/vnd.pingidentity.consent.accept+json
custom content type in the request header.
For property descriptions, see OAuth scope consent data model.
Property | Type | Required? |
---|---|---|
application | Relationship | Optional |
application.id | String | Optional |
application.name | String | Optional |
application.appType | String | Optional |
scope | Set | Optional |
status | String | Required |
user | Relationship | Optional |
user.id | String | Optional |
Request Body
{"application"=>{"name"=>"externalApp1", "appType"=>"EXTERNAL"}, "scope"=>["openid"], "browser"=>{"name"=>"Chrome", "version"=>"101"}, "operatingSystem"=>{"name"=>"Mac OS", "version"=>"12.5.1"}, "device"=>{"type"=>"desktop"}, "status"=>"ACCEPTED"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: Created
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32/oauthConsents/663a3fae-b0fa-4da3-a9ae-f2d60aebe56c"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"user":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32"},"consent.revoke":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32/oauthConsents/663a3fae-b0fa-4da3-a9ae-f2d60aebe56c"}},"id":"663a3fae-b0fa-4da3-a9ae-f2d60aebe56c","application":{"id":"a4f6b7ed-95be-4dde-b5b5-dde152625b75"},"applicationName":"externalApp1","applicationType":"EXTERNAL","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"user":{"id":"01dee5b5-48fa-4a6b-a574-f2ff28ab5b32"},"scope":["openid"],"browser":{"name":"Chrome","version":"101"},"operatingSystem":{"name":"Mac OS","version":"12.5.1"},"device":{"type":"desktop"},"location":{"remoteIp":"174.21.50.32","city":"tacoma","state":"washington","region":"pacific northwest","country":"united states"},"status":"ACCEPTED","consentedAt":"2022-08-24T22:31:45.573Z","updatedAt":"2022-08-24T22:31:45.573Z"}