Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
MCANTAL1639145723
Contributor
Contributor

tHttpRequest Post to get a token

Hello,

I am trying to develop a talend job that gets token from tHttpRequest component with the Post method but I am getting an error status :

401 Unauthorized.

When i tried to replicate the same using postman it was working. Below I have attached screenshot of my tHttpRequest, my json file and my test scenarios in postman for reference.

Can you help me to find what’s wrong ?

Thanks

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello @M CANTAL​ ,

Please try to add one Header key="Content-Type" with value="application/json" in tHttpRequest component like the below to re-try?

0695b00000lurvAAAQ.pngBest regards

Aiming

 

View solution in original post

2 Replies
Anonymous
Not applicable

Hello @M CANTAL​ ,

Please try to add one Header key="Content-Type" with value="application/json" in tHttpRequest component like the below to re-try?

0695b00000lurvAAAQ.pngBest regards

Aiming

 

MCANTAL1639145723
Contributor
Contributor
Author

Perfect, it's working.

Thanks.