Expand my Community achievements bar.

Adobe Journey Optimizer Community Lens 7th edition is out.

AJO Custom Action & Data Source - How to catch the Header values from Response ?

Avatar

Level 2

Hello,

 

In one of our clients' use case, we are working with an external system to which we need to make two API calls.

Call 1: Will give an API token. This API token is sent in response header (not in response body)

Call 2: Using the token from call 1, we have to call another API end point to save/update some data.

 

I know that in AJO custom action & data source, we can get the response body. But I am not sure how to get the response header.

 

Please share some ideas/thoughts how approach to this problem. 

 

Thank you and have a nice day ahead. 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6 Replies

Avatar

Employee

Could you share the requirement as to why response headers are needed ?

Avatar

Level 2

@dugganab thanks for your response.

 

The external system is designed to send API token in response header ONLY. 

So, we need a way to retrieve data from response header. 

Avatar

Employee

You can use it on the following lines, specifying the type of authorization as "Custom Authorization"

 

This will incorporate the access token in the outbound api call via custom actions https://experienceleague.adobe.com/en/docs/journey-optimizer/using/configuration/configure-journeys/... 

dugganab_0-1721725261581.png

 

Avatar

Level 2

@dugganab , I am trying but it is not successful yet. 

So, to clarify, in the custom action > custom authorization > I have to put the entire request that get the API token (call 1) > then the token will be applied to call 2. So, I just need one custom action. Please confirm.

Avatar

Community Advisor

@Joydeep 

Could you let me know if you're using custom authentication to generate token? If yes, the token generated from call 1 will pass as a request header parameter for call 2.

 

Check out these links https://medium.com/@anuhyareddy.y/ajo-jo-sending-email-delivery-via-3rd-party-marketing-automation-t...

https://experienceleague.adobe.com/en/docs/journey-optimizer/using/configuration/configure-journeys/...