Expand my Community achievements bar.

Adaptive Forms Integration with external APIs via user's Access token

Avatar

Level 3

Hi there,
I'm working on a requirement where we have to create a "Service Request Form" via Adaptive Form and pre populate the customer data on page load via calling some external APIs. These APIs expecting "Access token" to give us the user's bank account details. 

We've created a OAuth Service which connects to some other APIs and give us the access token and now we need to pass that access token from AEM to external APIs, gets the user specific data and prefilled the Adaptive forms.

We're trying to figure out a best way forward for this requirement to implement from Adaptive forms perspective. Kindly let me know your thoughts.


Approach 1:  Create Custom Javascript to make a ajax call to Servlet. This servlet will connect to external APIs and get the response.

Approach 2: Use Custom Authentication OOTB feature of Adaptive forms to create the datasource but I did not find any reference how we can utilize this ootb feature our requirement.

aemuser2021_0-1711529616591.png


Pls let me know your thoughts on this or if anyone has worked on similar kind of requirement before.

Thanks.

2 Replies