cancel
Showing results for 
Search instead for 
Did you mean: 

how to give redirect_uri in cpi

nagaraju_cygnet
Explorer

Dear Experts,

SAP <-----> cpi <---> REST system

i have a multiple rest apis in my iflow, all are synchronous. while calling one api in the request parameter level it is asking redirect_uri. in the response level i will get code. this code will go to this particular redirect_uri. how to create this redirect_uri in cpi level. also how to get this code to my iflow.

please help on this.

Best Regards,

Nagaraju

Accepted Solutions (1)

Accepted Solutions (1)

CarlosRoggan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Nagarju,

please check out this blog post, mentioning the redirect url and how to configure iFlow:

https://blogs.sap.com/2023/08/24/sap-cloud-integration-how-to-call-ias-based-application-from-iflow-...

Hope this helps in clarifying!
Cheers,

Carlos

nagaraju_cygnet
Explorer
0 Kudos

Dear Carlos,

sorry for the late response.

Thanks for your blog. now i am able to achieve my requirement (Oauth authentication using authorization code).

.

the problem is if the refresh token is expired at some point of time. at that movement if i get data to outbound call it is failing in cpi level due to invalid token. do we have any option to generate token using refresh token? i don't want to authorize everytime in the security material level. how to do this type of activity ( authorize security material ) every time in the production?

do we have any solution for this? please suggest.

Best Regards,

Nagaraju

CarlosRoggan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear nagaraju.cygnet ,

the problem with the "Authorization Code" credential flow is: it is designed for user interactive login flow.
The workaround is to do the interactive login once, then afterwards CPI will use the refresh-token for fetching a new access_token.
However, as you mentioned, even refresh tokens do expire after some time.
Then a new user-interactive step is required, I don't see any chance to get it automated, as the authorization requires exactly that: a human user login
I guess, this authorization code credential was added to CPI, in order to support scenarios, where the target system only supports this "grant_type".

* So the best solution in my eyes would be to check if it is possible to switch away from authorization code.

* On the other side, usually the authorization server, which is used in your scenario, should be able to be configured with "expiry" or "validity" setting for the "refresh token". You can check this out. Maybe your auth server supports never-ending refresh tokens

Kind Regards,
Carlos

Answers (1)

Answers (1)

VijayKonam
Active Contributor
0 Kudos

I would create a HTTP inbound iflow in CPi and provide that url to the API and see what happens when the call reaches to this HTTP iflow. It is essentially, experimenting and figuring it out.