I have an errorcode "401000",when I tried to use get method on the t_rest.I sucessfully retrieved the token on the first,so the next step is get the users list.
I have a created a context called token, to save this token for my next step because it will expire every one hour I guess.I saved the token in the context and with using that I tried to get users list on my second step but I didn't succeed .
Thanks for your suggestions,
You said you have used context variable to store the token value, but I don't see you use it on tRest_3 component which is calling API to get the user list, you are write it as a fixed string. To use context variable, the format is:
To store the token value to a context variable, you can do it on a tJavaRow component in the first step.
The issue is solved .The problem was adding the parameters in the tRest.
"Authorization" "Bearer "+context.token
I worked to put the above parameters and I succeeded to get my users list.
You can please leave a comment if you have some questions.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend
Test drive Talend's enterprise products.