|
| 1 | +# Enterprise Web App Credential API Reference |
| 2 | + |
| 3 | +Following is an API reference for Adobe Identity Management Services (IMS) APIs. |
| 4 | + |
| 5 | +## Consent URL parameters |
| 6 | + |
| 7 | +### Base URL |
| 8 | + |
| 9 | +```text |
| 10 | +https://id.adobe.com/consent |
| 11 | +``` |
| 12 | + |
| 13 | +### Query parameters |
| 14 | + |
| 15 | +| Query Parameter | Required | Description | Example | |
| 16 | +|-----------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------| |
| 17 | +| client_id | Yes | The Client ID of the partner app from the Enterprise Web App credential overview page. | abcd1234 | |
| 18 | +| scope | Yes | Comma-separated list of scopes you are requesting. Must be a subset of scopes listed on the Enterprise Web App credential overview page. | openid,AdobeId | |
| 19 | +| state | Yes | Cryptographically secure random string generated by the partner app for protection against CSRF attacks. | xyz987 | |
| 20 | +| nonce | Yes | Cryptographically secure random string generated by the partner app for protection against replay attacks. | nonce123 | |
| 21 | +| redirect_uri | Optional | The URL to which Adobe should redirect the admin after the consent workflow ends. This URL must match one of the redirect URL parameters configured in the Enterprise Web App credential. | https://example.com/redirect | |
| 22 | + |
| 23 | + |
| 24 | +## Redirect URL |
| 25 | + |
| 26 | +### Query paramters |
| 27 | + |
| 28 | +| Query Parameter | Always present | Description | Possible values | |
| 29 | +|-----------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------| |
| 30 | +| admin_consent | No | Denotes whether the admin consented to the partner app or not. This parameter is not present in the redirect if there was an error during the consent workflow | yes, no | |
| 31 | +| error | No | Denotes the error which occured during the consent workflow. This parameter is only present if there was an error in the redirect workflow. | See table below for all possible values. | |
| 32 | +| state | Yes | Adobe echos back the value of the state parameter you supplied | Same as the value you supplied in the consent URL. | |
| 33 | +| id_token | No | Adobe provides an id token to enable the partner app to generate access tokens. This parameter is only present if the admin provided consent to your application. | A well formed JSON web token. | |
| 34 | + |
| 35 | +### Error codes |
| 36 | + |
| 37 | + |
| 38 | +| Error Code | Description | |
| 39 | +|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 40 | +| invalid_scopes | Returned when the partner app requests one or more scopes that are not available to it. | |
| 41 | +| invalid_redirect_uri | Returned when the redirect URI provided in the consent URL does not match the redirect URL pattern configured on the Enterprise Web App credential. | |
| 42 | +| insufficient_privilege | Returned when the logged in user is not an admin and does not have the appropriate role to grant consent to the partner app. | |
| 43 | +| incompatible_account_type | Returned when the logged in user account is not a company or school account. Note: only company or school accounts can provide consent to a partner app. | |
| 44 | +| missing_state_param | Returned when the partner app did not provid a state query parameter in the consent URL. | |
| 45 | +| error | Retuerned when an unknown error occured. |
| 46 | + |
| 47 | + |
| 48 | +## Generate Access Token Request |
| 49 | + |
| 50 | +### cURL Request |
| 51 | + |
| 52 | +```cURL |
| 53 | +curl -X POST 'https://ims-na1.adobelogin.com/ims/token/v3' |
| 54 | + -H 'Content-Type: application/x-www-form-urlencoded' |
| 55 | + -d 'grant_type=client_credentials' |
| 56 | + -d 'client_id=<YOUR_CLIENT_ID>' |
| 57 | + -d 'client_secret=<YOUR_CLIENT_SECRET>' |
| 58 | + -d 'scope=<COMMA_SEPARATED_SCOPES>' |
| 59 | + -d 'org_id=<ORG_ID_EXTRACTED_FROM_A_VERIFIED_ID_TOKEN>' |
| 60 | +``` |
| 61 | + |
| 62 | +### Sample response |
| 63 | +```JSON |
| 64 | +{ |
| 65 | + "access_token": "ey.....", |
| 66 | + "expires_in": 3599 |
| 67 | +} |
| 68 | +``` |
0 commit comments