Using Resource Owner Password Credential (ROPC) Grant Type

Use the instructions here to generate an OAuth token using Resource Owner Password Credential (ROPC).

Generating the OAuth Token

Use the endpoint, as shown below, to generate an OAuth access token to use for accessing the API. This endpoint can be invoked with Standard authentication of a valid Base64 encoded value of "user:password" on Oracle Cloud Infrastructure that has been provisioned into Primavera Administration.

Scope must be the full path (always http) to the context root of the application - http://<host>:<port>/cloudapi/restapi.

Note: In the examples below, text surrounded in < > indicates a variable. You must replace variables with your own data to run the examples in this documentation.

Example using cURL

curl -X GET 'https://<server_URL>/cloudapi/restapi/oauth2/token?tokenExpiry=3600' --header 'Authorization: Basic <Base64-Encoded-value-of-user-password>'

The variables in the previous example should be replaced with the following information when accessing the API:

  • <server_URL>: The URL of the host server on which the application is deployed.
  • <Base64-Encoded-value-of-user-password>: The Base64 encoded value of "user:password". Use the cURL command to encode: "$(echo -n user-name:password | base64)".

Response Payload

Raw OAuth access token will be returned as part of response payload.

Example Using a REST Client

GET: https://<server_URL>/cloudapi/restapi/oauth2/token?tokenExpiry=3600

In Headers:

Authorization: Basic <Base64-Encoded-value-of-user-password>

The variables in the previous example should be replaced with the following information when accessing the API:

  • <server_URL>: The URL of the host server on which the application is deployed.
  • <Base64-Encoded-value-of-user-password>: The Base64 encoded value of "user:password".

Response:

Raw OAuth access token will be returned as part of response payload.