I'm trying to build a simple SAP CAP application that connects to SuccessFactors LMS API and runs a couple queries for a dashboard. I've already tested it using python but I'm trying to convert it to CAPM BTP and I cant figure out how to setup the destination manually in package.json or using subaccount destinations.
https://(SF instance Name).scdemo.successfactors.com/learning/oauth-api/rest/v1/token
For reference, I'm using the Oauth Token Server in Learning Administration and have successfully connected following the LMS API documentation using Postman and Python.
Its mainly because of the scope/grants below and I'm also unsure what type of oauth destination its using(I've tried Oauth2ClientCredentials and JWTBearer) . I haven't been able to find any resource setting this up so any help is appreciated. I've tried adding below as additional properties in Destination configuration but no luck
"companyId": "SF instance here",
"userType": "user type here",
As Gregor pointed, you should contact SuccessFactors and find the specific OAuth based API requirements.
Once you find that info, you can directly test your modelled destination using the Destination service REST API, 1st create the destination configuration using POST method, and then test it using the GET method of "Find a destination" API? Hint: you can use Curl, Postman, etc. so no need to deploy an app to test it out.
Note, and FYI: "Check Connection" functionality in SAP BTP cockpit allows the user to check if the technical communication protocol specific connection can be established, in this case the protocol is HTTP. OAuth flow is based on HTTP and it's out of scope.
Have you tried the configuration described in Cloud Platform Integration OAuth2 Credentials? I think you should be able to transfer that to a BTP destination. If not I would suggest to file an incident via the Successfactors support how it should be done and where it is documented.