Authorization
You can use OAuth to authorize requests that you send to the REST API for Documents.
Setting up your request to use OAuth is a two-step process. First, you obtain an OAuth token, and then you use this token to access the REST API. For details, see Integrate with Oracle Content and Experience Using OAuth.
-
From the command line, enter this URL:
curl -X POST \ https://<IDCS BaseURL>/oauth2/v1/token \ -H 'Authorization: Basic <Base64 encoded clientID:clientSecret>' \ -d 'grant_type=client_credentials&scope=<primaryAudience>/urn:opc:cec:all'
The
documents/web
context is protected by Oracle Identity Cloud Services (IDCS). The user will be prompted to sign in to IDCS unless there is already a valid IDCS session in the browser.The OAuth token is returned in the
tokenValue
field in the JSON response. The token is valid for 7 days, and the expiration is in seconds. -
To use the token and access Documents REST endpoints, use the Bearer Authorization header. For example:
curl -i -H 'Authorization: Bearer token' --request GET {Content Management URL}/api/1.2/folders/items