I have created a connection in OIC w.r.t ORDS sample adapter. I am using OAuth2.0 Client Credentials for Authorization.
In connection properties and details I provide HOST, PORT, SCHEMA along with Client ID and Client Secret.
By getting above properties from user, I am forming a url like “https://HOST:PORT/ords/SCHEMA/oauth/token”.
Here, for privacy I am not providing exact values for HOST, PORT & SCHEMA.
Passing Client ID & Secret as Auth Header.


When I try to generate access token from Postman, I am able to generate it successfully.


When I try doing same from OIC, while testing connection after providing all required above properties and credentials I am getting below error -
ERROR
Close
Unable to test connection TEST ORDS.
- CASDK-0004: Failed to authenticate against the application with the credentials provided Cannot request OAuth access token.
When I fetched logs, I found below errors -
[2023-11-30T15:14:46.657Z] [SEVERE] [ThreadID: 134] [Logger: oracle.soa.adapter.cloud] [SRC Class: oracle.cloud.adapter.common.security.oauth.AuthUtil; Method: log] [AccessToken] Access token response returned an error code[401].InboundJaxrsResponse{context=ClientResponse{method=POST, uri=https://HOST:PORT/ords/SCHEMA/oauth/token?grant_type=client_credentials&client_secret=OR-CqWq0YVMfxj_Oyyx8vA..&client_id=IvrFhJwt9P8SB_vsaH5vRg.., status=401, reason=Unauthorized}}
[2023-11-30T15:14:46.658Z] [SEVERE] [ThreadID: 134] [Logger: oracle.soa.adapter.cloud] [SRC Class: oracle.cloud.adapter.common.security.oauth.AuthUtil; Method: log] [DefaultAuthSecurityHandler] Error while requesting access token. InboundJaxrsResponse{context=ClientResponse{method=POST, uri=https://HOST:PORT/ords/SCHEMA/oauth/token?grant_type=client_credentials&client_secret=OR-CqWq0YVMfxj_Oyyx8vA..&client_id=IvrFhJwt9P8SB_vsaH5vRg.., status=401, reason=Unauthorized}}
I also tried by creating and using AGENT while testing connection but, getting same error.

I tried using Private IP & Public IP as HOST to generate access token but, both did not worked from OIC side.
From Postman using both IP types I am able to generate the token.
How can I generate access token for ORDS and test the connection successfully from OIC ?