AJO Custom Action & Data Source - How to catch the Header values from Response ? | Community
Skip to main content
Level 2
July 23, 2024
Solved

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

  • July 23, 2024
  • 2 replies
  • 3206 views

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. 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mohan_Dugganab

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/data-source-journeys/external-data-sources#custom-authentication-access-token 

 

2 replies

Mohan_Dugganab
Adobe Employee
Adobe Employee
July 23, 2024

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

JoydeepAuthor
Level 2
July 23, 2024

@mohan_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. 

Mohan_Dugganab
Adobe Employee
Mohan_DugganabAdobe EmployeeAccepted solution
Adobe Employee
July 23, 2024

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/data-source-journeys/external-data-sources#custom-authentication-access-token 

 

Anuhya-Y
Community Advisor
Community Advisor
July 23, 2024

@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-tool-sfmc-bef8cc7d7e10

https://experienceleague.adobe.com/en/docs/journey-optimizer/using/configuration/configure-journeys/data-source-journeys/external-data-sources#custom-authentication-mode

JoydeepAuthor
Level 2
July 23, 2024

@anuhya-y , thank you for your response.

 

Let me check.