cancel
Showing results for 
Search instead for 
Did you mean: 

Consume oauth2clientcredentials destination in sapui5 freestyle application

Chiranjeevi1
Explorer
0 Kudos

Hi ,

Is it possible to consume this cf destination directly in AJAX call in sapui5 freestyle application without multiple services call for token and then url?

Any reference link or blog will be helpful

Thank You

View Entire Topic
vneecious
Advisor
Advisor
0 Kudos

Yes, the Application Router (xs-app.js) will manage this for you.

Chiranjeevi1
Explorer
0 Kudos

Hi Vinicius,

So do we need to do a ajax call 2 times? One for token and other get request?

Thank You

vneecious
Advisor
Advisor
0 Kudos

No, AppRouter will take care of all the credential steps for you. You just have to add a route pointing to the destination in xs-app.json, and then use this route for your calls.

Chiranjeevi1
Explorer
0 Kudos

Hi Vinicius,

Thank You for the response!..

After adding to xs-app. json... How to call/execute the destination? This is a rest api destination not an odata. We have to do some call right?

Thank You