cancel
Showing results for 
Search instead for 
Did you mean: 

Ariba API into SAP Ui5/Fiori Apps

assad
Explorer
0 Kudos

Hi All,

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 :

https://eu.openapi.ariba.com/api/supplierdatapagination/v4/sandbox/vendorDataRequests/?realm=DSAPPXX...

I am using the OAuth Client Id/OAuth Secret in the user and password.

Appreciate any help on the parameters used to connect.

Thanks.

Assad

Accepted Solutions (1)

Accepted Solutions (1)

ccottier
Explorer
0 Kudos

Hi Assad,

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.

Best regards,

Cédric

assad
Explorer
0 Kudos

Hi Cédric,

Thanks for your reply, I have got some idea based on the link you had provided.

I am just trying to figure out calling these API's from a SAP Ui5 application.

Thanks again.

Assad

Answers (1)

Answers (1)

gabrielmendes
Advisor
Advisor
0 Kudos

Hi, Ariba APIs work on oAuth2 authentication not Basic authentication, try with OAuth2JWTBearer or OAuth2UserTokenExchange

https://help.sap.com/doc/92c0b171cceb4db2a93518b34b84febd/Cloud/en-US/connectivity_service.pdf page 17