Adobe io campaign API integration with aem | Community
Skip to main content
TarunKumar
Community Advisor
Community Advisor
April 7, 2022
Solved

Adobe io campaign API integration with aem

  • April 7, 2022
  • 2 replies
  • 1299 views

Hi,

I am trying to create campaign event through my AEM java code but not able to do so. In the process of creating a bearer or access token I have written below logic but it seems to be failing and giving 500 internal server error.
Below is the code snippet:-

While I am able to create Bearer token using postman but not programmatically.

Any help would be much appreciated.

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 TarunKumar

I was able to solve it.  Just simulated the behavior wit postman call in my java code and it worked.

2 replies

Prince_Shivhare
Community Advisor
Community Advisor
April 8, 2022

Hey,

Can I know which method you are writing in your servlet?

if it is a post and trying from localhost then make sure in your config manager you remove the POST from Referrer filter.

TarunKumar
Community Advisor
Community Advisor
April 14, 2022

Hi @prince_shivhare 

 

I am using Get method in my servlet. Looking at below screen print I am getting issue at highlighted part where I am getting 500 internal server error in response. Due to this I am not able to create access token.
Though with the same jwttoken created from below code at line number 148 I am able to get access token using Postman.

 

 




TarunKumar
Community Advisor
TarunKumarCommunity AdvisorAuthorAccepted solution
Community Advisor
August 25, 2022

I was able to solve it.  Just simulated the behavior wit postman call in my java code and it worked.