Authenticate

You must have a preexisting account (username and password) to access Oracle Health Immunization Management Cloud Service and permission to use the REST API. To request access to the REST API, contact your Oracle Health Immunization Management Cloud Service administrator.

Oracle Health Immunization Management Cloud Service is integrated with IDCS. REST API users can authenticate and authorize by providing an IDCS access token within an HTTP header. The IDCS access token needs to be passed as a bearer token in the Authorization header. You can generate an access token using the REST API token generation endpoint (POST https://<domain_name>/oauth2/v1/token?grant_type=client_credentials).

For example, to authenticate using cURL:

  1. Provide the server and endpoint:

    curl -X POST -s "https://<domain_name>/oauth2/v1/token?grant_type=client_credentials"

    Where <domain_name> is the fully qualified domain name for the host server for Oracle Health Immunization Management Cloud Service.

  2. Pass the request and authorization headers using the -H cURL option:

    -H "Content-Type: application/x-www-form-urlencoded"
    -H "Authorization: Basic <base_64_encoded_client_id>:<client_secret>"
    

    Where:

    • <base_64_encoded_client_id> is the client ID.
    • <client_secret> is the client secret.
  3. Pass the request body using the -d cURL option:

    -d "grant_type=client_credentials&scope=urn:opc:idm:__myscopes__"

The folllowing provides an example of the complete cURL command:

curl -X POST -s "https://<server>/oauth2/v1/token?grant_type=client_credentials"
-H "Content-Type: application/x-www-form-urlencoded"
-H "Authorization: Basic <base_64_encoded_client_id>:<client_secret>"
-d "grant_type=client_credentials&scope=urn:opc:idm:__myscopes__"

200 Response:

{  
  "access_token":"<access_token_string>",  
  "token_type":"bearer",  
  "expires_in":<integer>
}

Where:

  • <access_token_string> is the access token, in alphanumeric format.
  • <integer> is the value of when the token expires, in numeric format.