I am new to API's and was trying to access Ariba API into SAP Cloud trial version. I was able to get access to Ariba API Developer portal and got the API Key/OAuth Client Id/OAuth Secret. While I am trying to create a destination in Cloud foundry the connection is not getting established.
Connection to "XXX" established. Response returned: "401: Unauthorized"
Below is the URL I am using to connect :
I am using the OAuth Client Id/OAuth Secret in the user and password.
Appreciate any help on the parameters used to connect.
I have never tried to access Ariba's API from SAP Cloud Platform Destinations but I have already worked with Procurement APIs.
You need to get an "access_token" (based on OAuth Client and Secret) first before being able to call an other API. So I suppose this is why you are getting an error 401 because you call the API without being granted the access_token.
I recently replied to a similar question and described the process so maybe it can be useful for you.
Hi, Ariba APIs work on oAuth2 authentication not Basic authentication, try with OAuth2JWTBearer or OAuth2UserTokenExchange