Authorization

You have two ways to authorize the requests that you send to the Content Management REST APIs.

  • OAuth

  • Basic

Using OAuth

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 set the Authorization header.

  1. From a browser, enter this URL:

    https://docsDomain:port/documents/web?IdcService=GET_OAUTH_TOKEN

    The documents/web context is protected by Oracle Access Manager (OAM), so there is going to be an OAM log-in page, unless there is a valid OAM session in the browser. If there is already a valid session, the user should not be prompted to log in to OAM.

    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.

  2. To use the token and access Content Management REST endpoints, use the Bearer Authorization header; for example:

    curl -i -H 'Authorization: Bearer token' --request GET {Docs External URL}/api/1.1/folders/items

Using Basic Authorization

To use Basic Authorization:

  1. Base64 encode the username:password string.

  2. Set the Authorization header to Basic username:password-as-a-Base64-encoded-string.