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.
Solved! Go to Solution.
Views
Replies
Total Likes
I was able to solve it. Just simulated the behavior wit postman call in my java code and it worked.
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.
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.
I was able to solve it. Just simulated the behavior wit postman call in my java code and it worked.
Views
Likes
Replies
Views
Likes
Replies