Managing the Access token for a Server to Server Configuration
Hello Team,
Recently I am working on a POC task, where I need to get details from Adobe Analytics and show the details in my AEM applications home page. So, basically this is a serer to sever connection, where I am displaying application specific data in my application. Consider: I am trying to get the most visited pages, and displaying in descending order based on visitor count.
Based on few articles, I was able to crack the logic to display the Adobe analytics data.
https://adobedocs.github.io/analytics-2.0-apis/
https://developer.adobe.com/analytics-apis/docs/2.0/guides/endpoints/reports/
From this, I am able to get the access token too.
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/generate-server-to-server-authentication-access-token-from-java/td-p/654917 Special thanks to @imran__khan for his quick help.
From above I was able to get the response: Response {"access_token":"eyJhbSomeLetters","token_type":"bearer","expires_in":86399} Whether I will get refresh token here??? Not sure. Let me explore.
Now, my major query is: Ideally I should not save this access token in user browser cookie. Since, I need to use a single access token for all the end user request, until the token expires. How can I implement this logic?
I hope for every application to application integration (i mean AEM to Adobe Analytics or any other AEM app integration), concept of using the access token (which is specific to application)remains the same. So, I am curious to know from others, how you are managing to keep the access token in server? Note: My AEM application has 3 publisher environment.
Also, one more observation: What is this article? Related to Integration with Adobe Analytics using IMS
cc @imran__khan @kautuk_sahni @aanchal-sikka @joerghoh @briankasingli @raja_reddy @estebanbustamante @arunpatidar @lukasz-m
