Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to pass authorization token coming from one api to another api using tREST component. When I try to use context variable to store the token and use it in tREST component it is failing while working when hard coding the token can u please help.
Each implementation of OAuth is slightly different (annoyingly), but I suspect that you might be missing either a token prefix or maybe converting it to base64 (or similar). I have written a tutorial on using Google's OAuth implementation with Talend here (https://www.rilhia.com/tutorials/using-oauth-20-talend-access-google-apis) and recall having all sorts of irritating issues like this.
Hi @pravin_sanadi,
You will need to give a bit more information as to what is going wrong. Do you receive any error messages or XML responses which describe what it is objecting to? We really do need the details to help with this
Regards
Richard
Can you post a screenshot of your job and how you are setting the value of the context variable.
I suspect you don't assign the value to context variable correctly, I have achieved similar case and I am able to use context variable, please upload a screenshot to show where/how you assign the value, and show an example value.
Regards
Shong
Hi,
This is the job structure
First tREST_1 is gives the token . In tJavaRow_1 I am setting the context variable
And in tRest_2
You are printing the token value out to the output window once it is set in your context variable. Can you see this in the output window? If you can, can you change the variable you are printing from var_FINAL_TOKEN to your context variable? Does that print out correctly? Can you show us what is returned?
If everything is being returned as you would expect, try changing your onComponentOK link to an OnSubJobOK link