Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Adobe Analytics 2.0 report integration in AEM application.

Avatar

Level 8

Hello Team,

 

If anyone did Adobe Analytics 2.0 report integration in your AEM application, could you please pass me your journey?

or any tutorial links?

 

Note: I am able to call the reports API

Post call : https://analytics.adobe.io/api/abcdef/reports

with necessary payload. But, I have hardcoded Auth token, just for testing purpose. This works fine.

But, wanted to generate Auth token dynamically.

Any help will be much appreciated.

 

cc @aanchal-sikka  @Jörg_Hoh  @BrianKasingli  @Raja_Reddy  @EstebanBustamante @arunpatidar @kautuk_sahni 

4 Replies

Avatar

Community Advisor

Hi,

The authorization is done through the Adobe Developer Console. Here you can find overall the whole documentation: https://developer.adobe.com/developer-console/docs/guides/authentication/, But I think this is exactly what you may want to do: https://developer.adobe.com/developer-console/docs/guides/authentication/UserAuthentication/implemen... 

 

Hope this helps.



Esteban Bustamante

Avatar

Community Advisor

Hi @Mahesh_Gunaje 
https://developer.adobe.com/analytics-apis/docs/2.0/ 
https://developer.adobe.com/developer-console/docs/guides/#!AdobeDocs/analytics-2.0-apis/master/auth... 
https://developer.adobe.com/developer-console/docs/guides/authentication

  1. Register your application

  2. Obtain the client ID and client secret: Once your application is registered, you will receive a client ID and client secret. These credentials will be used to authenticate your application and generate the Auth token.

  3. Implement the OAuth 2.0 authentication flow: Use the client ID and client secret to implement the OAuth 2.0 authentication flow in your AEM application. This involves redirecting the user to the Adobe authentication page, where they will be prompted to log in and grant permissions to your application. After successful authentication, your application will receive an authorization code.

  4. Exchange the authorization code for an access token: Use the authorization code to make a POST request to the Adobe authentication server to exchange it for an access token. This access token will be used to authenticate your API calls to the Adobe Analytics 2.0 API.

  5. Use the access token in your API calls: Once you have obtained the access token, you can use it in your API calls to the Adobe Analytics 2.0 API. Include the access token in the Authorization header of your API requests.



Avatar

Level 8

Hi @Raja_Reddy  @EstebanBustamante 

Thanks for your reply. I have 1 query related to Step 3 that you have mentioned:

Implement the OAuth 2.0 authentication flow:  I need to use: Server to Server authentication https://developer.adobe.com/developer-console/docs/guides/authentication/ServerToServerAuthenticatio...

The token generation process for a server to server credential only authenticates your application. Therefore, the generated access token can only be used to read and modify data owned by your application.

In this case, do you think end user must login to Adobe to provide their username, password to see the analytics report?

 

 

Avatar

Administrator

@Mahesh_Gunaje Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni