Authorization

You can use OAuth to authorize requests that you send to the REST API for Content Management.

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.

  1. From the command line, enter this URL:

    curl -X POST \
    https://<IDCS BaseURL>/oauth2/v1/token \
    -H 'Authorization: Basic <Base64 encoded clientID:clientSecret>' \
    -H 'Host: <idcs hostname>' \
    -d 'grant_type=client_credentials&scope=https%3A%2F%<ServiceInstanceBaseURL>%3A443%2Furn%3Aopc%3Acec%3Aall'

    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.

  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 {Content Management URL}/content/management/api/v1.1/items